1# generated automatically by aclocal 1.7.9 -*- 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.9])]) 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 # We will build objects and dependencies in a subdirectory because 549 # it helps to detect inapplicable dependency modes. For instance 550 # both Tru64's cc and ICC support -MD to output dependencies as a 551 # side effect of compilation, but ICC will put the dependencies in 552 # the current directory while Tru64 will put them in the object 553 # directory. 554 mkdir sub 555 556 am_cv_$1_dependencies_compiler_type=none 557 if test "$am_compiler_list" = ""; then 558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 559 fi 560 for depmode in $am_compiler_list; do 561 # Setup a source with many dependencies, because some compilers 562 # like to wrap large dependency lists on column 80 (with \), and 563 # we should not choose a depcomp mode which is confused by this. 564 # 565 # We need to recreate these files for each test, as the compiler may 566 # overwrite some of them when testing with obscure command lines. 567 # This happens at least with the AIX C compiler. 568 : > sub/conftest.c 569 for i in 1 2 3 4 5 6; do 570 echo '#include "conftst'$i'.h"' >> sub/conftest.c 571 : > sub/conftst$i.h 572 done 573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 574 575 case $depmode in 576 nosideeffect) 577 # after this tag, mechanisms are not by side-effect, so they'll 578 # only be used when explicitly requested 579 if test "x$enable_dependency_tracking" = xyes; then 580 continue 581 else 582 break 583 fi 584 ;; 585 none) break ;; 586 esac 587 # We check with `-c' and `-o' for the sake of the "dashmstdout" 588 # mode. It turns out that the SunPro C++ compiler does not properly 589 # handle `-M -o', and we need to detect this. 590 if depmode=$depmode \ 591 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 592 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 593 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 594 >/dev/null 2>conftest.err && 595 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 596 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 598 # icc doesn't choke on unknown options, it will just issue warnings 599 # (even with -Werror). So we grep stderr for any message 600 # that says an option was ignored. 601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 602 am_cv_$1_dependencies_compiler_type=$depmode 603 break 604 fi 605 fi 606 done 607 608 cd .. 609 rm -rf conftest.dir 610else 611 am_cv_$1_dependencies_compiler_type=none 612fi 613]) 614AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 615AM_CONDITIONAL([am__fastdep$1], [ 616 test "x$enable_dependency_tracking" != xno \ 617 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 618]) 619 620 621# AM_SET_DEPDIR 622# ------------- 623# Choose a directory name for dependency files. 624# This macro is AC_REQUIREd in _AM_DEPENDENCIES 625AC_DEFUN([AM_SET_DEPDIR], 626[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 627AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 628]) 629 630 631# AM_DEP_TRACK 632# ------------ 633AC_DEFUN([AM_DEP_TRACK], 634[AC_ARG_ENABLE(dependency-tracking, 635[ --disable-dependency-tracking Speeds up one-time builds 636 --enable-dependency-tracking Do not reject slow dependency extractors]) 637if test "x$enable_dependency_tracking" != xno; then 638 am_depcomp="$ac_aux_dir/depcomp" 639 AMDEPBACKSLASH='\' 640fi 641AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 642AC_SUBST([AMDEPBACKSLASH]) 643]) 644 645# Generate code to set up dependency tracking. -*- Autoconf -*- 646 647# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 648 649# This program is free software; you can redistribute it and/or modify 650# it under the terms of the GNU General Public License as published by 651# the Free Software Foundation; either version 2, or (at your option) 652# any later version. 653 654# This program is distributed in the hope that it will be useful, 655# but WITHOUT ANY WARRANTY; without even the implied warranty of 656# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 657# GNU General Public License for more details. 658 659# You should have received a copy of the GNU General Public License 660# along with this program; if not, write to the Free Software 661# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 662# 02111-1307, USA. 663 664#serial 2 665 666# _AM_OUTPUT_DEPENDENCY_COMMANDS 667# ------------------------------ 668AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 669[for mf in $CONFIG_FILES; do 670 # Strip MF so we end up with the name of the file. 671 mf=`echo "$mf" | sed -e 's/:.*$//'` 672 # Check whether this is an Automake generated Makefile or not. 673 # We used to match only the files named `Makefile.in', but 674 # some people rename them; so instead we look at the file content. 675 # Grep'ing the first line is not enough: some people post-process 676 # each Makefile.in and add a new line on top of each file to say so. 677 # So let's grep whole file. 678 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 679 dirpart=`AS_DIRNAME("$mf")` 680 else 681 continue 682 fi 683 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 684 # Extract the definition of DEP_FILES from the Makefile without 685 # running `make'. 686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 687 test -z "$DEPDIR" && continue 688 # When using ansi2knr, U may be empty or an underscore; expand it 689 U=`sed -n -e '/^U = / s///p' < "$mf"` 690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 691 # We invoke sed twice because it is the simplest approach to 692 # changing $(DEPDIR) to its actual value in the expansion. 693 for file in `sed -n -e ' 694 /^DEP_FILES = .*\\\\$/ { 695 s/^DEP_FILES = // 696 :loop 697 s/\\\\$// 698 p 699 n 700 /\\\\$/ b loop 701 p 702 } 703 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 704 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 705 # Make sure the directory exists. 706 test -f "$dirpart/$file" && continue 707 fdir=`AS_DIRNAME(["$file"])` 708 AS_MKDIR_P([$dirpart/$fdir]) 709 # echo "creating $dirpart/$file" 710 echo '# dummy' > "$dirpart/$file" 711 done 712done 713])# _AM_OUTPUT_DEPENDENCY_COMMANDS 714 715 716# AM_OUTPUT_DEPENDENCY_COMMANDS 717# ----------------------------- 718# This macro should only be invoked once -- use via AC_REQUIRE. 719# 720# This code is only required when automatic dependency tracking 721# is enabled. FIXME. This creates each `.P' file that we will 722# need in order to bootstrap the dependency handling code. 723AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 724[AC_CONFIG_COMMANDS([depfiles], 725 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 727]) 728 729# Check to see how 'make' treats includes. -*- Autoconf -*- 730 731# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 732 733# This program is free software; you can redistribute it and/or modify 734# it under the terms of the GNU General Public License as published by 735# the Free Software Foundation; either version 2, or (at your option) 736# any later version. 737 738# This program is distributed in the hope that it will be useful, 739# but WITHOUT ANY WARRANTY; without even the implied warranty of 740# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 741# GNU General Public License for more details. 742 743# You should have received a copy of the GNU General Public License 744# along with this program; if not, write to the Free Software 745# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 746# 02111-1307, USA. 747 748# serial 2 749 750# AM_MAKE_INCLUDE() 751# ----------------- 752# Check to see how make treats includes. 753AC_DEFUN([AM_MAKE_INCLUDE], 754[am_make=${MAKE-make} 755cat > confinc << 'END' 756am__doit: 757 @echo done 758.PHONY: am__doit 759END 760# If we don't find an include directive, just comment out the code. 761AC_MSG_CHECKING([for style of include used by $am_make]) 762am__include="#" 763am__quote= 764_am_result=none 765# First try GNU make style include. 766echo "include confinc" > confmf 767# We grep out `Entering directory' and `Leaving directory' 768# messages which can occur if `w' ends up in MAKEFLAGS. 769# In particular we don't look at `^make:' because GNU make might 770# be invoked under some other name (usually "gmake"), in which 771# case it prints its new name instead of `make'. 772if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 773 am__include=include 774 am__quote= 775 _am_result=GNU 776fi 777# Now try BSD make style include. 778if test "$am__include" = "#"; then 779 echo '.include "confinc"' > confmf 780 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 781 am__include=.include 782 am__quote="\"" 783 _am_result=BSD 784 fi 785fi 786AC_SUBST([am__include]) 787AC_SUBST([am__quote]) 788AC_MSG_RESULT([$_am_result]) 789rm -f confinc confmf 790]) 791 792# AM_CONDITIONAL -*- Autoconf -*- 793 794# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 795 796# This program is free software; you can redistribute it and/or modify 797# it under the terms of the GNU General Public License as published by 798# the Free Software Foundation; either version 2, or (at your option) 799# any later version. 800 801# This program is distributed in the hope that it will be useful, 802# but WITHOUT ANY WARRANTY; without even the implied warranty of 803# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 804# GNU General Public License for more details. 805 806# You should have received a copy of the GNU General Public License 807# along with this program; if not, write to the Free Software 808# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 809# 02111-1307, USA. 810 811# serial 5 812 813AC_PREREQ(2.52) 814 815# AM_CONDITIONAL(NAME, SHELL-CONDITION) 816# ------------------------------------- 817# Define a conditional. 818AC_DEFUN([AM_CONDITIONAL], 819[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 821AC_SUBST([$1_TRUE]) 822AC_SUBST([$1_FALSE]) 823if $2; then 824 $1_TRUE= 825 $1_FALSE='#' 826else 827 $1_TRUE='#' 828 $1_FALSE= 829fi 830AC_CONFIG_COMMANDS_PRE( 831[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 832 AC_MSG_ERROR([conditional "$1" was never defined. 833Usually this means the macro was only invoked conditionally.]) 834fi])]) 835 836# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 837# 838# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 839# 840# This program is free software; you can redistribute it and/or modify 841# it under the terms of the GNU General Public License as published by 842# the Free Software Foundation; either version 2 of the License, or 843# (at your option) any later version. 844# 845# This program is distributed in the hope that it will be useful, but 846# WITHOUT ANY WARRANTY; without even the implied warranty of 847# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 848# General Public License for more details. 849# 850# You should have received a copy of the GNU General Public License 851# along with this program; if not, write to the Free Software 852# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 853# 854# As a special exception to the GNU General Public License, if you 855# distribute this file as part of a program that contains a 856# configuration script generated by Autoconf, you may include it under 857# the same distribution terms that you use for the rest of that program. 858 859# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 860# ---------------------------------- 861AC_DEFUN([PKG_PROG_PKG_CONFIG], 862[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 863m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 864AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 865if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 866 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 867fi 868if test -n "$PKG_CONFIG"; then 869 _pkg_min_version=m4_default([$1], [0.9.0]) 870 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 871 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 872 AC_MSG_RESULT([yes]) 873 else 874 AC_MSG_RESULT([no]) 875 PKG_CONFIG="" 876 fi 877 878fi[]dnl 879])# PKG_PROG_PKG_CONFIG 880 881# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 882# 883# Check to see whether a particular set of modules exists. Similar 884# to PKG_CHECK_MODULES(), but does not set variables or print errors. 885# 886# 887# Similar to PKG_CHECK_MODULES, make sure that the first instance of 888# this or PKG_CHECK_MODULES is called, or make sure to call 889# PKG_CHECK_EXISTS manually 890# -------------------------------------------------------------- 891AC_DEFUN([PKG_CHECK_EXISTS], 892[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 893if test -n "$PKG_CONFIG" && \ 894 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 895 m4_ifval([$2], [$2], [:]) 896m4_ifvaln([$3], [else 897 $3])dnl 898fi]) 899 900 901# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 902# --------------------------------------------- 903m4_define([_PKG_CONFIG], 904[if test -n "$PKG_CONFIG"; then 905 if test -n "$$1"; then 906 pkg_cv_[]$1="$$1" 907 else 908 PKG_CHECK_EXISTS([$3], 909 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 910 [pkg_failed=yes]) 911 fi 912else 913 pkg_failed=untried 914fi[]dnl 915])# _PKG_CONFIG 916 917# _PKG_SHORT_ERRORS_SUPPORTED 918# ----------------------------- 919AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 920[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 921if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 922 _pkg_short_errors_supported=yes 923else 924 _pkg_short_errors_supported=no 925fi[]dnl 926])# _PKG_SHORT_ERRORS_SUPPORTED 927 928 929# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 930# [ACTION-IF-NOT-FOUND]) 931# 932# 933# Note that if there is a possibility the first call to 934# PKG_CHECK_MODULES might not happen, you should be sure to include an 935# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 936# 937# 938# -------------------------------------------------------------- 939AC_DEFUN([PKG_CHECK_MODULES], 940[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 941AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 942AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 943 944pkg_failed=no 945AC_MSG_CHECKING([for $1]) 946 947_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 948_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 949 950m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 951and $1[]_LIBS to avoid the need to call pkg-config. 952See the pkg-config man page for more details.]) 953 954if test $pkg_failed = yes; then 955 _PKG_SHORT_ERRORS_SUPPORTED 956 if test $_pkg_short_errors_supported = yes; then 957 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 958 else 959 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 960 fi 961 # Put the nasty error message in config.log where it belongs 962 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 963 964 ifelse([$4], , [AC_MSG_ERROR(dnl 965[Package requirements ($2) were not met: 966 967$$1_PKG_ERRORS 968 969Consider adjusting the PKG_CONFIG_PATH environment variable if you 970installed software in a non-standard prefix. 971 972_PKG_TEXT 973])], 974 [$4]) 975elif test $pkg_failed = untried; then 976 ifelse([$4], , [AC_MSG_FAILURE(dnl 977[The pkg-config script could not be found or is too old. Make sure it 978is in your PATH or set the PKG_CONFIG environment variable to the full 979path to pkg-config. 980 981_PKG_TEXT 982 983To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 984 [$4]) 985else 986 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 987 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 988 AC_MSG_RESULT([yes]) 989 ifelse([$3], , :, [$3]) 990fi[]dnl 991])# PKG_CHECK_MODULES 992 993# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 994 995# serial 47 AC_PROG_LIBTOOL 996 997 998# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 999# ----------------------------------------------------------- 1000# If this macro is not defined by Autoconf, define it here. 1001m4_ifdef([AC_PROVIDE_IFELSE], 1002 [], 1003 [m4_define([AC_PROVIDE_IFELSE], 1004 [m4_ifdef([AC_PROVIDE_$1], 1005 [$2], [$3])])]) 1006 1007 1008# AC_PROG_LIBTOOL 1009# --------------- 1010AC_DEFUN([AC_PROG_LIBTOOL], 1011[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 1012dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 1013dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 1014 AC_PROVIDE_IFELSE([AC_PROG_CXX], 1015 [AC_LIBTOOL_CXX], 1016 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 1017 ])]) 1018dnl And a similar setup for Fortran 77 support 1019 AC_PROVIDE_IFELSE([AC_PROG_F77], 1020 [AC_LIBTOOL_F77], 1021 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 1022])]) 1023 1024dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 1025dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 1026dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 1027 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 1028 [AC_LIBTOOL_GCJ], 1029 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 1030 [AC_LIBTOOL_GCJ], 1031 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 1032 [AC_LIBTOOL_GCJ], 1033 [ifdef([AC_PROG_GCJ], 1034 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1035 ifdef([A][M_PROG_GCJ], 1036 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 1037 ifdef([LT_AC_PROG_GCJ], 1038 [define([LT_AC_PROG_GCJ], 1039 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 1040])])# AC_PROG_LIBTOOL 1041 1042 1043# _AC_PROG_LIBTOOL 1044# ---------------- 1045AC_DEFUN([_AC_PROG_LIBTOOL], 1046[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 1047AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 1048AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 1049AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 1050 1051# This can be used to rebuild libtool when needed 1052LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 1053 1054# Always use our own libtool. 1055LIBTOOL='$(SHELL) $(top_builddir)/libtool' 1056AC_SUBST(LIBTOOL)dnl 1057 1058# Prevent multiple expansion 1059define([AC_PROG_LIBTOOL], []) 1060])# _AC_PROG_LIBTOOL 1061 1062 1063# AC_LIBTOOL_SETUP 1064# ---------------- 1065AC_DEFUN([AC_LIBTOOL_SETUP], 1066[AC_PREREQ(2.50)dnl 1067AC_REQUIRE([AC_ENABLE_SHARED])dnl 1068AC_REQUIRE([AC_ENABLE_STATIC])dnl 1069AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 1070AC_REQUIRE([AC_CANONICAL_HOST])dnl 1071AC_REQUIRE([AC_CANONICAL_BUILD])dnl 1072AC_REQUIRE([AC_PROG_CC])dnl 1073AC_REQUIRE([AC_PROG_LD])dnl 1074AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 1075AC_REQUIRE([AC_PROG_NM])dnl 1076 1077AC_REQUIRE([AC_PROG_LN_S])dnl 1078AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 1079# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 1080AC_REQUIRE([AC_OBJEXT])dnl 1081AC_REQUIRE([AC_EXEEXT])dnl 1082dnl 1083 1084AC_LIBTOOL_SYS_MAX_CMD_LEN 1085AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 1086AC_LIBTOOL_OBJDIR 1087 1088AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1089_LT_AC_PROG_ECHO_BACKSLASH 1090 1091case $host_os in 1092aix3*) 1093 # AIX sometimes has problems with the GCC collect2 program. For some 1094 # reason, if we set the COLLECT_NAMES environment variable, the problems 1095 # vanish in a puff of smoke. 1096 if test "X${COLLECT_NAMES+set}" != Xset; then 1097 COLLECT_NAMES= 1098 export COLLECT_NAMES 1099 fi 1100 ;; 1101esac 1102 1103# Sed substitution that helps us do robust quoting. It backslashifies 1104# metacharacters that are still active within double-quoted strings. 1105Xsed='sed -e 1s/^X//' 1106[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 1107 1108# Same as above, but do not quote variable references. 1109[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 1110 1111# Sed substitution to delay expansion of an escaped shell variable in a 1112# double_quote_subst'ed string. 1113delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1114 1115# Sed substitution to avoid accidental globbing in evaled expressions 1116no_glob_subst='s/\*/\\\*/g' 1117 1118# Constants: 1119rm="rm -f" 1120 1121# Global variables: 1122default_ofile=libtool 1123can_build_shared=yes 1124 1125# All known linkers require a `.a' archive for static linking (except M$VC, 1126# which needs '.lib'). 1127libext=a 1128ltmain="$ac_aux_dir/ltmain.sh" 1129ofile="$default_ofile" 1130with_gnu_ld="$lt_cv_prog_gnu_ld" 1131 1132AC_CHECK_TOOL(AR, ar, false) 1133AC_CHECK_TOOL(RANLIB, ranlib, :) 1134AC_CHECK_TOOL(STRIP, strip, :) 1135 1136old_CC="$CC" 1137old_CFLAGS="$CFLAGS" 1138 1139# Set sane defaults for various variables 1140test -z "$AR" && AR=ar 1141test -z "$AR_FLAGS" && AR_FLAGS=cru 1142test -z "$AS" && AS=as 1143test -z "$CC" && CC=cc 1144test -z "$LTCC" && LTCC=$CC 1145test -z "$DLLTOOL" && DLLTOOL=dlltool 1146test -z "$LD" && LD=ld 1147test -z "$LN_S" && LN_S="ln -s" 1148test -z "$MAGIC_CMD" && MAGIC_CMD=file 1149test -z "$NM" && NM=nm 1150test -z "$SED" && SED=sed 1151test -z "$OBJDUMP" && OBJDUMP=objdump 1152test -z "$RANLIB" && RANLIB=: 1153test -z "$STRIP" && STRIP=: 1154test -z "$ac_objext" && ac_objext=o 1155 1156# Determine commands to create old-style static archives. 1157old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 1158old_postinstall_cmds='chmod 644 $oldlib' 1159old_postuninstall_cmds= 1160 1161if test -n "$RANLIB"; then 1162 case $host_os in 1163 openbsd*) 1164 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 1165 ;; 1166 *) 1167 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 1168 ;; 1169 esac 1170 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1171fi 1172 1173_LT_CC_BASENAME([$compiler]) 1174 1175# Only perform the check for file, if the check method requires it 1176case $deplibs_check_method in 1177file_magic*) 1178 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1179 AC_PATH_MAGIC 1180 fi 1181 ;; 1182esac 1183 1184AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 1185AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1186enable_win32_dll=yes, enable_win32_dll=no) 1187 1188AC_ARG_ENABLE([libtool-lock], 1189 [AC_HELP_STRING([--disable-libtool-lock], 1190 [avoid locking (might break parallel builds)])]) 1191test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1192 1193AC_ARG_WITH([pic], 1194 [AC_HELP_STRING([--with-pic], 1195 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1196 [pic_mode="$withval"], 1197 [pic_mode=default]) 1198test -z "$pic_mode" && pic_mode=default 1199 1200# Use C for the default configuration in the libtool script 1201tagname= 1202AC_LIBTOOL_LANG_C_CONFIG 1203_LT_AC_TAGCONFIG 1204])# AC_LIBTOOL_SETUP 1205 1206 1207# _LT_AC_SYS_COMPILER 1208# ------------------- 1209AC_DEFUN([_LT_AC_SYS_COMPILER], 1210[AC_REQUIRE([AC_PROG_CC])dnl 1211 1212# If no C compiler was specified, use CC. 1213LTCC=${LTCC-"$CC"} 1214 1215# Allow CC to be a program name with arguments. 1216compiler=$CC 1217])# _LT_AC_SYS_COMPILER 1218 1219 1220# _LT_CC_BASENAME(CC) 1221# ------------------- 1222# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1223AC_DEFUN([_LT_CC_BASENAME], 1224[for cc_temp in $1""; do 1225 case $cc_temp in 1226 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1227 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1228 \-*) ;; 1229 *) break;; 1230 esac 1231done 1232cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1233]) 1234 1235 1236# _LT_COMPILER_BOILERPLATE 1237# ------------------------ 1238# Check for compiler boilerplate output or warnings with 1239# the simple compiler test code. 1240AC_DEFUN([_LT_COMPILER_BOILERPLATE], 1241[ac_outfile=conftest.$ac_objext 1242printf "$lt_simple_compile_test_code" >conftest.$ac_ext 1243eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 1244_lt_compiler_boilerplate=`cat conftest.err` 1245$rm conftest* 1246])# _LT_COMPILER_BOILERPLATE 1247 1248 1249# _LT_LINKER_BOILERPLATE 1250# ---------------------- 1251# Check for linker boilerplate output or warnings with 1252# the simple link test code. 1253AC_DEFUN([_LT_LINKER_BOILERPLATE], 1254[ac_outfile=conftest.$ac_objext 1255printf "$lt_simple_link_test_code" >conftest.$ac_ext 1256eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err 1257_lt_linker_boilerplate=`cat conftest.err` 1258$rm conftest* 1259])# _LT_LINKER_BOILERPLATE 1260 1261 1262# _LT_AC_SYS_LIBPATH_AIX 1263# ---------------------- 1264# Links a minimal program and checks the executable 1265# for the system default hardcoded library path. In most cases, 1266# this is /usr/lib:/lib, but when the MPI compilers are used 1267# the location of the communication and MPI libs are included too. 1268# If we don't find anything, use the default library path according 1269# to the aix ld manual. 1270AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 1271[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1272aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1273}'` 1274# Check for a 64-bit object if we didn't find anything. 1275if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 1276}'`; fi],[]) 1277if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1278])# _LT_AC_SYS_LIBPATH_AIX 1279 1280 1281# _LT_AC_SHELL_INIT(ARG) 1282# ---------------------- 1283AC_DEFUN([_LT_AC_SHELL_INIT], 1284[ifdef([AC_DIVERSION_NOTICE], 1285 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1286 [AC_DIVERT_PUSH(NOTICE)]) 1287$1 1288AC_DIVERT_POP 1289])# _LT_AC_SHELL_INIT 1290 1291 1292# _LT_AC_PROG_ECHO_BACKSLASH 1293# -------------------------- 1294# Add some code to the start of the generated configure script which 1295# will find an echo command which doesn't interpret backslashes. 1296AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 1297[_LT_AC_SHELL_INIT([ 1298# Check that we are running under the correct shell. 1299SHELL=${CONFIG_SHELL-/bin/sh} 1300 1301case X$ECHO in 1302X*--fallback-echo) 1303 # Remove one level of quotation (which was required for Make). 1304 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1305 ;; 1306esac 1307 1308echo=${ECHO-echo} 1309if test "X[$]1" = X--no-reexec; then 1310 # Discard the --no-reexec flag, and continue. 1311 shift 1312elif test "X[$]1" = X--fallback-echo; then 1313 # Avoid inline document here, it may be left over 1314 : 1315elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 1316 # Yippee, $echo works! 1317 : 1318else 1319 # Restart under the correct shell. 1320 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1321fi 1322 1323if test "X[$]1" = X--fallback-echo; then 1324 # used as fallback echo 1325 shift 1326 cat <<EOF 1327[$]* 1328EOF 1329 exit 0 1330fi 1331 1332# The HP-UX ksh and POSIX shell print the target directory to stdout 1333# if CDPATH is set. 1334(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1335 1336if test -z "$ECHO"; then 1337if test "X${echo_test_string+set}" != Xset; then 1338# find a string as large as possible, as long as the shell can cope with it 1339 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1340 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1341 if (echo_test_string="`eval $cmd`") 2>/dev/null && 1342 echo_test_string="`eval $cmd`" && 1343 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 1344 then 1345 break 1346 fi 1347 done 1348fi 1349 1350if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1351 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1352 test "X$echo_testing_string" = "X$echo_test_string"; then 1353 : 1354else 1355 # The Solaris, AIX, and Digital Unix default echo programs unquote 1356 # backslashes. This makes it impossible to quote backslashes using 1357 # echo "$something" | sed 's/\\/\\\\/g' 1358 # 1359 # So, first we look for a working echo in the user's PATH. 1360 1361 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1362 for dir in $PATH /usr/ucb; do 1363 IFS="$lt_save_ifs" 1364 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1365 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1366 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1367 test "X$echo_testing_string" = "X$echo_test_string"; then 1368 echo="$dir/echo" 1369 break 1370 fi 1371 done 1372 IFS="$lt_save_ifs" 1373 1374 if test "X$echo" = Xecho; then 1375 # We didn't find a better echo, so look for alternatives. 1376 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 1377 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 1378 test "X$echo_testing_string" = "X$echo_test_string"; then 1379 # This shell has a builtin print -r that does the trick. 1380 echo='print -r' 1381 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 1382 test "X$CONFIG_SHELL" != X/bin/ksh; then 1383 # If we have ksh, try running configure again with it. 1384 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1385 export ORIGINAL_CONFIG_SHELL 1386 CONFIG_SHELL=/bin/ksh 1387 export CONFIG_SHELL 1388 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1389 else 1390 # Try using printf. 1391 echo='printf %s\n' 1392 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 1393 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 1394 test "X$echo_testing_string" = "X$echo_test_string"; then 1395 # Cool, printf works 1396 : 1397 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1398 test "X$echo_testing_string" = 'X\t' && 1399 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1400 test "X$echo_testing_string" = "X$echo_test_string"; then 1401 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1402 export CONFIG_SHELL 1403 SHELL="$CONFIG_SHELL" 1404 export SHELL 1405 echo="$CONFIG_SHELL [$]0 --fallback-echo" 1406 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1407 test "X$echo_testing_string" = 'X\t' && 1408 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1409 test "X$echo_testing_string" = "X$echo_test_string"; then 1410 echo="$CONFIG_SHELL [$]0 --fallback-echo" 1411 else 1412 # maybe with a smaller string... 1413 prev=: 1414 1415 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1416 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 1417 then 1418 break 1419 fi 1420 prev="$cmd" 1421 done 1422 1423 if test "$prev" != 'sed 50q "[$]0"'; then 1424 echo_test_string=`eval $prev` 1425 export echo_test_string 1426 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1427 else 1428 # Oops. We lost completely, so just stick with echo. 1429 echo=echo 1430 fi 1431 fi 1432 fi 1433 fi 1434fi 1435fi 1436 1437# Copy echo and quote the copy suitably for passing to libtool from 1438# the Makefile, instead of quoting the original, which is used later. 1439ECHO=$echo 1440if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1441 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1442fi 1443 1444AC_SUBST(ECHO) 1445])])# _LT_AC_PROG_ECHO_BACKSLASH 1446 1447 1448# _LT_AC_LOCK 1449# ----------- 1450AC_DEFUN([_LT_AC_LOCK], 1451[AC_ARG_ENABLE([libtool-lock], 1452 [AC_HELP_STRING([--disable-libtool-lock], 1453 [avoid locking (might break parallel builds)])]) 1454test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1455 1456# Some flags need to be propagated to the compiler or linker for good 1457# libtool support. 1458case $host in 1459ia64-*-hpux*) 1460 # Find out which ABI we are using. 1461 echo 'int i;' > conftest.$ac_ext 1462 if AC_TRY_EVAL(ac_compile); then 1463 case `/usr/bin/file conftest.$ac_objext` in 1464 *ELF-32*) 1465 HPUX_IA64_MODE="32" 1466 ;; 1467 *ELF-64*) 1468 HPUX_IA64_MODE="64" 1469 ;; 1470 esac 1471 fi 1472 rm -rf conftest* 1473 ;; 1474*-*-irix6*) 1475 # Find out which ABI we are using. 1476 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1477 if AC_TRY_EVAL(ac_compile); then 1478 if test "$lt_cv_prog_gnu_ld" = yes; then 1479 case `/usr/bin/file conftest.$ac_objext` in 1480 *32-bit*) 1481 LD="${LD-ld} -melf32bsmip" 1482 ;; 1483 *N32*) 1484 LD="${LD-ld} -melf32bmipn32" 1485 ;; 1486 *64-bit*) 1487 LD="${LD-ld} -melf64bmip" 1488 ;; 1489 esac 1490 else 1491 case `/usr/bin/file conftest.$ac_objext` in 1492 *32-bit*) 1493 LD="${LD-ld} -32" 1494 ;; 1495 *N32*) 1496 LD="${LD-ld} -n32" 1497 ;; 1498 *64-bit*) 1499 LD="${LD-ld} -64" 1500 ;; 1501 esac 1502 fi 1503 fi 1504 rm -rf conftest* 1505 ;; 1506 1507x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 1508 # Find out which ABI we are using. 1509 echo 'int i;' > conftest.$ac_ext 1510 if AC_TRY_EVAL(ac_compile); then 1511 case "`/usr/bin/file conftest.o`" in 1512 *32-bit*) 1513 case $host in 1514 x86_64-*linux*) 1515 LD="${LD-ld} -m elf_i386" 1516 ;; 1517 ppc64-*linux*|powerpc64-*linux*) 1518 LD="${LD-ld} -m elf32ppclinux" 1519 ;; 1520 s390x-*linux*) 1521 LD="${LD-ld} -m elf_s390" 1522 ;; 1523 sparc64-*linux*) 1524 LD="${LD-ld} -m elf32_sparc" 1525 ;; 1526 esac 1527 ;; 1528 *64-bit*) 1529 case $host in 1530 x86_64-*linux*) 1531 LD="${LD-ld} -m elf_x86_64" 1532 ;; 1533 ppc*-*linux*|powerpc*-*linux*) 1534 LD="${LD-ld} -m elf64ppc" 1535 ;; 1536 s390*-*linux*) 1537 LD="${LD-ld} -m elf64_s390" 1538 ;; 1539 sparc*-*linux*) 1540 LD="${LD-ld} -m elf64_sparc" 1541 ;; 1542 esac 1543 ;; 1544 esac 1545 fi 1546 rm -rf conftest* 1547 ;; 1548 1549*-*-sco3.2v5*) 1550 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1551 SAVE_CFLAGS="$CFLAGS" 1552 CFLAGS="$CFLAGS -belf" 1553 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1554 [AC_LANG_PUSH(C) 1555 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1556 AC_LANG_POP]) 1557 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1558 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1559 CFLAGS="$SAVE_CFLAGS" 1560 fi 1561 ;; 1562AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 1563[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1564 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1565 AC_CHECK_TOOL(AS, as, false) 1566 AC_CHECK_TOOL(OBJDUMP, objdump, false) 1567 ;; 1568 ]) 1569esac 1570 1571need_locks="$enable_libtool_lock" 1572 1573])# _LT_AC_LOCK 1574 1575 1576# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1577# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1578# ---------------------------------------------------------------- 1579# Check whether the given compiler option works 1580AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 1581[AC_REQUIRE([LT_AC_PROG_SED]) 1582AC_CACHE_CHECK([$1], [$2], 1583 [$2=no 1584 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1585 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1586 lt_compiler_flag="$3" 1587 # Insert the option either (1) after the last *FLAGS variable, or 1588 # (2) before a word containing "conftest.", or (3) at the end. 1589 # Note that $ac_compile itself does not contain backslashes and begins 1590 # with a dollar sign (not a hyphen), so the echo should work correctly. 1591 # The option is referenced via a variable to avoid confusing sed. 1592 lt_compile=`echo "$ac_compile" | $SED \ 1593 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ 1594 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1595 -e 's:$: $lt_compiler_flag:'` 1596 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1597 (eval "$lt_compile" 2>conftest.err) 1598 ac_status=$? 1599 cat conftest.err >&AS_MESSAGE_LOG_FD 1600 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1601 if (exit $ac_status) && test -s "$ac_outfile"; then 1602 # The compiler can only warn and ignore the option if not recognized 1603 # So say no if there are warnings other than the usual output. 1604 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp 1605 $SED '/^$/d' conftest.err >conftest.er2 1606 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then 1607 $2=yes 1608 fi 1609 fi 1610 $rm conftest* 1611]) 1612 1613if test x"[$]$2" = xyes; then 1614 ifelse([$5], , :, [$5]) 1615else 1616 ifelse([$6], , :, [$6]) 1617fi 1618])# AC_LIBTOOL_COMPILER_OPTION 1619 1620 1621# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1622# [ACTION-SUCCESS], [ACTION-FAILURE]) 1623# ------------------------------------------------------------ 1624# Check whether the given compiler option works 1625AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 1626[AC_CACHE_CHECK([$1], [$2], 1627 [$2=no 1628 save_LDFLAGS="$LDFLAGS" 1629 LDFLAGS="$LDFLAGS $3" 1630 printf "$lt_simple_link_test_code" > conftest.$ac_ext 1631 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1632 # The compiler can only warn and ignore the option if not recognized 1633 # So say no if there are warnings 1634 if test -s conftest.err; then 1635 # Append any errors to the config.log. 1636 cat conftest.err 1>&AS_MESSAGE_LOG_FD 1637 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp 1638 $SED '/^$/d' conftest.err >conftest.er2 1639 if diff conftest.exp conftest.er2 >/dev/null; then 1640 $2=yes 1641 fi 1642 else 1643 $2=yes 1644 fi 1645 fi 1646 $rm conftest* 1647 LDFLAGS="$save_LDFLAGS" 1648]) 1649 1650if test x"[$]$2" = xyes; then 1651 ifelse([$4], , :, [$4]) 1652else 1653 ifelse([$5], , :, [$5]) 1654fi 1655])# AC_LIBTOOL_LINKER_OPTION 1656 1657 1658# AC_LIBTOOL_SYS_MAX_CMD_LEN 1659# -------------------------- 1660AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 1661[# find the maximum length of command line arguments 1662AC_MSG_CHECKING([the maximum length of command line arguments]) 1663AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1664 i=0 1665 teststring="ABCD" 1666 1667 case $build_os in 1668 msdosdjgpp*) 1669 # On DJGPP, this test can blow up pretty badly due to problems in libc 1670 # (any single argument exceeding 2000 bytes causes a buffer overrun 1671 # during glob expansion). Even if it were fixed, the result of this 1672 # check would be larger than it should be. 1673 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1674 ;; 1675 1676 gnu*) 1677 # Under GNU Hurd, this test is not required because there is 1678 # no limit to the length of command line arguments. 1679 # Libtool will interpret -1 as no limit whatsoever 1680 lt_cv_sys_max_cmd_len=-1; 1681 ;; 1682 1683 cygwin* | mingw*) 1684 # On Win9x/ME, this test blows up -- it succeeds, but takes 1685 # about 5 minutes as the teststring grows exponentially. 1686 # Worse, since 9x/ME are not pre-emptively multitasking, 1687 # you end up with a "frozen" computer, even though with patience 1688 # the test eventually succeeds (with a max line length of 256k). 1689 # Instead, let's just punt: use the minimum linelength reported by 1690 # all of the supported platforms: 8192 (on NT/2K/XP). 1691 lt_cv_sys_max_cmd_len=8192; 1692 ;; 1693 1694 amigaos*) 1695 # On AmigaOS with pdksh, this test takes hours, literally. 1696 # So we just punt and use a minimum line length of 8192. 1697 lt_cv_sys_max_cmd_len=8192; 1698 ;; 1699 1700 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1701 # This has been around since 386BSD, at least. Likely further. 1702 if test -x /sbin/sysctl; then 1703 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1704 elif test -x /usr/sbin/sysctl; then 1705 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1706 else 1707 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD 1708 fi 1709 # And add a safety zone 1710 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1711 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1712 ;; 1713 osf*) 1714 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1715 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1716 # nice to cause kernel panics so lets avoid the loop below. 1717 # First set a reasonable default. 1718 lt_cv_sys_max_cmd_len=16384 1719 # 1720 if test -x /sbin/sysconfig; then 1721 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1722 *1*) lt_cv_sys_max_cmd_len=-1 ;; 1723 esac 1724 fi 1725 ;; 1726 *) 1727 # If test is not a shell built-in, we'll probably end up computing a 1728 # maximum length that is only half of the actual maximum length, but 1729 # we can't tell. 1730 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1731 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 1732 = "XX$teststring") >/dev/null 2>&1 && 1733 new_result=`expr "X$teststring" : ".*" 2>&1` && 1734 lt_cv_sys_max_cmd_len=$new_result && 1735 test $i != 17 # 1/2 MB should be enough 1736 do 1737 i=`expr $i + 1` 1738 teststring=$teststring$teststring 1739 done 1740 teststring= 1741 # Add a significant safety factor because C++ compilers can tack on massive 1742 # amounts of additional arguments before passing them to the linker. 1743 # It appears as though 1/2 is a usable value. 1744 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1745 ;; 1746 esac 1747]) 1748if test -n $lt_cv_sys_max_cmd_len ; then 1749 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1750else 1751 AC_MSG_RESULT(none) 1752fi 1753])# AC_LIBTOOL_SYS_MAX_CMD_LEN 1754 1755 1756# _LT_AC_CHECK_DLFCN 1757# -------------------- 1758AC_DEFUN([_LT_AC_CHECK_DLFCN], 1759[AC_CHECK_HEADERS(dlfcn.h)dnl 1760])# _LT_AC_CHECK_DLFCN 1761 1762 1763# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1764# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1765# ------------------------------------------------------------------ 1766AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 1767[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1768if test "$cross_compiling" = yes; then : 1769 [$4] 1770else 1771 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1772 lt_status=$lt_dlunknown 1773 cat > conftest.$ac_ext <<EOF 1774[#line __oline__ "configure" 1775#include "confdefs.h" 1776 1777#if HAVE_DLFCN_H 1778#include <dlfcn.h> 1779#endif 1780 1781#include <stdio.h> 1782 1783#ifdef RTLD_GLOBAL 1784# define LT_DLGLOBAL RTLD_GLOBAL 1785#else 1786# ifdef DL_GLOBAL 1787# define LT_DLGLOBAL DL_GLOBAL 1788# else 1789# define LT_DLGLOBAL 0 1790# endif 1791#endif 1792 1793/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1794 find out it does not work in some platform. */ 1795#ifndef LT_DLLAZY_OR_NOW 1796# ifdef RTLD_LAZY 1797# define LT_DLLAZY_OR_NOW RTLD_LAZY 1798# else 1799# ifdef DL_LAZY 1800# define LT_DLLAZY_OR_NOW DL_LAZY 1801# else 1802# ifdef RTLD_NOW 1803# define LT_DLLAZY_OR_NOW RTLD_NOW 1804# else 1805# ifdef DL_NOW 1806# define LT_DLLAZY_OR_NOW DL_NOW 1807# else 1808# define LT_DLLAZY_OR_NOW 0 1809# endif 1810# endif 1811# endif 1812# endif 1813#endif 1814 1815#ifdef __cplusplus 1816extern "C" void exit (int); 1817#endif 1818 1819void fnord() { int i=42;} 1820int main () 1821{ 1822 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1823 int status = $lt_dlunknown; 1824 1825 if (self) 1826 { 1827 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1828 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829 /* dlclose (self); */ 1830 } 1831 1832 exit (status); 1833}] 1834EOF 1835 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1836 (./conftest; exit; ) 2>/dev/null 1837 lt_status=$? 1838 case x$lt_status in 1839 x$lt_dlno_uscore) $1 ;; 1840 x$lt_dlneed_uscore) $2 ;; 1841 x$lt_unknown|x*) $3 ;; 1842 esac 1843 else : 1844 # compilation failed 1845 $3 1846 fi 1847fi 1848rm -fr conftest* 1849])# _LT_AC_TRY_DLOPEN_SELF 1850 1851 1852# AC_LIBTOOL_DLOPEN_SELF 1853# ------------------- 1854AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 1855[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 1856if test "x$enable_dlopen" != xyes; then 1857 enable_dlopen=unknown 1858 enable_dlopen_self=unknown 1859 enable_dlopen_self_static=unknown 1860else 1861 lt_cv_dlopen=no 1862 lt_cv_dlopen_libs= 1863 1864 case $host_os in 1865 beos*) 1866 lt_cv_dlopen="load_add_on" 1867 lt_cv_dlopen_libs= 1868 lt_cv_dlopen_self=yes 1869 ;; 1870 1871 mingw* | pw32*) 1872 lt_cv_dlopen="LoadLibrary" 1873 lt_cv_dlopen_libs= 1874 ;; 1875 1876 cygwin*) 1877 lt_cv_dlopen="dlopen" 1878 lt_cv_dlopen_libs= 1879 ;; 1880 1881 darwin*) 1882 # if libdl is installed we need to link against it 1883 AC_CHECK_LIB([dl], [dlopen], 1884 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1885 lt_cv_dlopen="dyld" 1886 lt_cv_dlopen_libs= 1887 lt_cv_dlopen_self=yes 1888 ]) 1889 ;; 1890 1891 *) 1892 AC_CHECK_FUNC([shl_load], 1893 [lt_cv_dlopen="shl_load"], 1894 [AC_CHECK_LIB([dld], [shl_load], 1895 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 1896 [AC_CHECK_FUNC([dlopen], 1897 [lt_cv_dlopen="dlopen"], 1898 [AC_CHECK_LIB([dl], [dlopen], 1899 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1900 [AC_CHECK_LIB([svld], [dlopen], 1901 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1902 [AC_CHECK_LIB([dld], [dld_link], 1903 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 1904 ]) 1905 ]) 1906 ]) 1907 ]) 1908 ]) 1909 ;; 1910 esac 1911 1912 if test "x$lt_cv_dlopen" != xno; then 1913 enable_dlopen=yes 1914 else 1915 enable_dlopen=no 1916 fi 1917 1918 case $lt_cv_dlopen in 1919 dlopen) 1920 save_CPPFLAGS="$CPPFLAGS" 1921 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1922 1923 save_LDFLAGS="$LDFLAGS" 1924 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1925 1926 save_LIBS="$LIBS" 1927 LIBS="$lt_cv_dlopen_libs $LIBS" 1928 1929 AC_CACHE_CHECK([whether a program can dlopen itself], 1930 lt_cv_dlopen_self, [dnl 1931 _LT_AC_TRY_DLOPEN_SELF( 1932 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1933 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1934 ]) 1935 1936 if test "x$lt_cv_dlopen_self" = xyes; then 1937 LDFLAGS="$LDFLAGS $link_static_flag" 1938 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1939 lt_cv_dlopen_self_static, [dnl 1940 _LT_AC_TRY_DLOPEN_SELF( 1941 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1942 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1943 ]) 1944 fi 1945 1946 CPPFLAGS="$save_CPPFLAGS" 1947 LDFLAGS="$save_LDFLAGS" 1948 LIBS="$save_LIBS" 1949 ;; 1950 esac 1951 1952 case $lt_cv_dlopen_self in 1953 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1954 *) enable_dlopen_self=unknown ;; 1955 esac 1956 1957 case $lt_cv_dlopen_self_static in 1958 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1959 *) enable_dlopen_self_static=unknown ;; 1960 esac 1961fi 1962])# AC_LIBTOOL_DLOPEN_SELF 1963 1964 1965# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 1966# --------------------------------- 1967# Check to see if options -c and -o are simultaneously supported by compiler 1968AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 1969[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 1970AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1971 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1972 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1973 $rm -r conftest 2>/dev/null 1974 mkdir conftest 1975 cd conftest 1976 mkdir out 1977 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 1978 1979 lt_compiler_flag="-o out/conftest2.$ac_objext" 1980 # Insert the option either (1) after the last *FLAGS variable, or 1981 # (2) before a word containing "conftest.", or (3) at the end. 1982 # Note that $ac_compile itself does not contain backslashes and begins 1983 # with a dollar sign (not a hyphen), so the echo should work correctly. 1984 lt_compile=`echo "$ac_compile" | $SED \ 1985 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ 1986 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1987 -e 's:$: $lt_compiler_flag:'` 1988 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1989 (eval "$lt_compile" 2>out/conftest.err) 1990 ac_status=$? 1991 cat out/conftest.err >&AS_MESSAGE_LOG_FD 1992 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1993 if (exit $ac_status) && test -s out/conftest2.$ac_objext 1994 then 1995 # The compiler can only warn and ignore the option if not recognized 1996 # So say no if there are warnings 1997 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp 1998 $SED '/^$/d' out/conftest.err >out/conftest.er2 1999 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2000 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2001 fi 2002 fi 2003 chmod u+w . 2004 $rm conftest* 2005 # SGI C++ compiler will create directory out/ii_files/ for 2006 # template instantiation 2007 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 2008 $rm out/* && rmdir out 2009 cd .. 2010 rmdir conftest 2011 $rm conftest* 2012]) 2013])# AC_LIBTOOL_PROG_CC_C_O 2014 2015 2016# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 2017# ----------------------------------------- 2018# Check to see if we can do hard links to lock some files if needed 2019AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 2020[AC_REQUIRE([_LT_AC_LOCK])dnl 2021 2022hard_links="nottested" 2023if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2024 # do not overwrite the value of need_locks provided by the user 2025 AC_MSG_CHECKING([if we can lock with hard links]) 2026 hard_links=yes 2027 $rm conftest* 2028 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2029 touch conftest.a 2030 ln conftest.a conftest.b 2>&5 || hard_links=no 2031 ln conftest.a conftest.b 2>/dev/null && hard_links=no 2032 AC_MSG_RESULT([$hard_links]) 2033 if test "$hard_links" = no; then 2034 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2035 need_locks=warn 2036 fi 2037else 2038 need_locks=no 2039fi 2040])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 2041 2042 2043# AC_LIBTOOL_OBJDIR 2044# ----------------- 2045AC_DEFUN([AC_LIBTOOL_OBJDIR], 2046[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2047[rm -f .libs 2>/dev/null 2048mkdir .libs 2>/dev/null 2049if test -d .libs; then 2050 lt_cv_objdir=.libs 2051else 2052 # MS-DOS does not allow filenames that begin with a dot. 2053 lt_cv_objdir=_libs 2054fi 2055rmdir .libs 2>/dev/null]) 2056objdir=$lt_cv_objdir 2057])# AC_LIBTOOL_OBJDIR 2058 2059 2060# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 2061# ---------------------------------------------- 2062# Check hardcoding attributes. 2063AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 2064[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2065_LT_AC_TAGVAR(hardcode_action, $1)= 2066if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 2067 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 2068 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2069 2070 # We can hardcode non-existant directories. 2071 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 2072 # If the only mechanism to avoid hardcoding is shlibpath_var, we 2073 # have to relink, otherwise we might link with an installed library 2074 # when we should be linking with a yet-to-be-installed one 2075 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2076 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 2077 # Linking always hardcodes the temporary library directory. 2078 _LT_AC_TAGVAR(hardcode_action, $1)=relink 2079 else 2080 # We can link without hardcoding, and we can hardcode nonexisting dirs. 2081 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 2082 fi 2083else 2084 # We cannot hardcode anything, or else we can only hardcode existing 2085 # directories. 2086 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 2087fi 2088AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 2089 2090if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 2091 # Fast installation is not supported 2092 enable_fast_install=no 2093elif test "$shlibpath_overrides_runpath" = yes || 2094 test "$enable_shared" = no; then 2095 # Fast installation is not necessary 2096 enable_fast_install=needless 2097fi 2098])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 2099 2100 2101# AC_LIBTOOL_SYS_LIB_STRIP 2102# ------------------------ 2103AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 2104[striplib= 2105old_striplib= 2106AC_MSG_CHECKING([whether stripping libraries is possible]) 2107if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 2108 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2109 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2110 AC_MSG_RESULT([yes]) 2111else 2112# FIXME - insert some real tests, host_os isn't really good enough 2113 case $host_os in 2114 darwin*) 2115 if test -n "$STRIP" ; then 2116 striplib="$STRIP -x" 2117 AC_MSG_RESULT([yes]) 2118 else 2119 AC_MSG_RESULT([no]) 2120fi 2121 ;; 2122 *) 2123 AC_MSG_RESULT([no]) 2124 ;; 2125 esac 2126fi 2127])# AC_LIBTOOL_SYS_LIB_STRIP 2128 2129 2130# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2131# ----------------------------- 2132# PORTME Fill in your ld.so characteristics 2133AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 2134[AC_MSG_CHECKING([dynamic linker characteristics]) 2135library_names_spec= 2136libname_spec='lib$name' 2137soname_spec= 2138shrext_cmds=".so" 2139postinstall_cmds= 2140postuninstall_cmds= 2141finish_cmds= 2142finish_eval= 2143shlibpath_var= 2144shlibpath_overrides_runpath=unknown 2145version_type=none 2146dynamic_linker="$host_os ld.so" 2147sys_lib_dlsearch_path_spec="/lib /usr/lib" 2148if test "$GCC" = yes; then 2149 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2150 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 2151 # if the path contains ";" then we assume it to be the separator 2152 # otherwise default to the standard path separator (i.e. ":") - it is 2153 # assumed that no part of a normal pathname contains ";" but that should 2154 # okay in the real world where ";" in dirpaths is itself problematic. 2155 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2156 else 2157 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2158 fi 2159else 2160 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2161fi 2162need_lib_prefix=unknown 2163hardcode_into_libs=no 2164 2165# when you set need_version to no, make sure it does not cause -set_version 2166# flags to be left without arguments 2167need_version=unknown 2168 2169case $host_os in 2170aix3*) 2171 version_type=linux 2172 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2173 shlibpath_var=LIBPATH 2174 2175 # AIX 3 has no versioning support, so we append a major version to the name. 2176 soname_spec='${libname}${release}${shared_ext}$major' 2177 ;; 2178 2179aix4* | aix5*) 2180 version_type=linux 2181 need_lib_prefix=no 2182 need_version=no 2183 hardcode_into_libs=yes 2184 if test "$host_cpu" = ia64; then 2185 # AIX 5 supports IA64 2186 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2187 shlibpath_var=LD_LIBRARY_PATH 2188 else 2189 # With GCC up to 2.95.x, collect2 would create an import file 2190 # for dependence libraries. The import file would start with 2191 # the line `#! .'. This would cause the generated library to 2192 # depend on `.', always an invalid library. This was fixed in 2193 # development snapshots of GCC prior to 3.0. 2194 case $host_os in 2195 aix4 | aix4.[[01]] | aix4.[[01]].*) 2196 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2197 echo ' yes ' 2198 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 2199 : 2200 else 2201 can_build_shared=no 2202 fi 2203 ;; 2204 esac 2205 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2206 # soname into executable. Probably we can add versioning support to 2207 # collect2, so additional links can be useful in future. 2208 if test "$aix_use_runtimelinking" = yes; then 2209 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2210 # instead of lib<name>.a to let people know that these are not 2211 # typical AIX shared libraries. 2212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2213 else 2214 # We preserve .a as extension for shared libraries through AIX4.2 2215 # and later when we are not doing run time linking. 2216 library_names_spec='${libname}${release}.a $libname.a' 2217 soname_spec='${libname}${release}${shared_ext}$major' 2218 fi 2219 shlibpath_var=LIBPATH 2220 fi 2221 ;; 2222 2223amigaos*) 2224 library_names_spec='$libname.ixlibrary $libname.a' 2225 # Create ${libname}_ixlibrary.a entries in /sys/libs. 2226 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' 2227 ;; 2228 2229beos*) 2230 library_names_spec='${libname}${shared_ext}' 2231 dynamic_linker="$host_os ld.so" 2232 shlibpath_var=LIBRARY_PATH 2233 ;; 2234 2235bsdi[[45]]*) 2236 version_type=linux 2237 need_version=no 2238 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2239 soname_spec='${libname}${release}${shared_ext}$major' 2240 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2241 shlibpath_var=LD_LIBRARY_PATH 2242 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2243 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2244 # the default ld.so.conf also contains /usr/contrib/lib and 2245 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2246 # libtool to hard-code these into programs 2247 ;; 2248 2249cygwin* | mingw* | pw32*) 2250 version_type=windows 2251 shrext_cmds=".dll" 2252 need_version=no 2253 need_lib_prefix=no 2254 2255 case $GCC,$host_os in 2256 yes,cygwin* | yes,mingw* | yes,pw32*) 2257 library_names_spec='$libname.dll.a' 2258 # DLL is installed to $(libdir)/../bin by postinstall_cmds 2259 postinstall_cmds='base_file=`basename \${file}`~ 2260 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 2261 dldir=$destdir/`dirname \$dlpath`~ 2262 test -d \$dldir || mkdir -p \$dldir~ 2263 $install_prog $dir/$dlname \$dldir/$dlname' 2264 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2265 dlpath=$dir/\$dldll~ 2266 $rm \$dlpath' 2267 shlibpath_overrides_runpath=yes 2268 2269 case $host_os in 2270 cygwin*) 2271 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2272 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2273 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2274 ;; 2275 mingw*) 2276 # MinGW DLLs use traditional 'lib' prefix 2277 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2278 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2279 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 2280 # It is most probably a Windows format PATH printed by 2281 # mingw gcc, but we are running on Cygwin. Gcc prints its search 2282 # path with ; separators, and with drive letters. We can handle the 2283 # drive letters (cygwin fileutils understands them), so leave them, 2284 # especially as we might pass files found there to a mingw objdump, 2285 # which wouldn't understand a cygwinified path. Ahh. 2286 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2287 else 2288 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2289 fi 2290 ;; 2291 pw32*) 2292 # pw32 DLLs use 'pw' prefix rather than 'lib' 2293 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2294 ;; 2295 esac 2296 ;; 2297 2298 *) 2299 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2300 ;; 2301 esac 2302 dynamic_linker='Win32 ld.exe' 2303 # FIXME: first we should search . and the directory the executable is in 2304 shlibpath_var=PATH 2305 ;; 2306 2307darwin* | rhapsody*) 2308 dynamic_linker="$host_os dyld" 2309 version_type=darwin 2310 need_lib_prefix=no 2311 need_version=no 2312 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2313 soname_spec='${libname}${release}${major}$shared_ext' 2314 shlibpath_overrides_runpath=yes 2315 shlibpath_var=DYLD_LIBRARY_PATH 2316 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' 2317 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 2318 if test "$GCC" = yes; then 2319 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` 2320 else 2321 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 2322 fi 2323 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2324 ;; 2325 2326dgux*) 2327 version_type=linux 2328 need_lib_prefix=no 2329 need_version=no 2330 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2331 soname_spec='${libname}${release}${shared_ext}$major' 2332 shlibpath_var=LD_LIBRARY_PATH 2333 ;; 2334 2335freebsd1*) 2336 dynamic_linker=no 2337 ;; 2338 2339kfreebsd*-gnu) 2340 version_type=linux 2341 need_lib_prefix=no 2342 need_version=no 2343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2344 soname_spec='${libname}${release}${shared_ext}$major' 2345 shlibpath_var=LD_LIBRARY_PATH 2346 shlibpath_overrides_runpath=no 2347 hardcode_into_libs=yes 2348 dynamic_linker='GNU ld.so' 2349 ;; 2350 2351freebsd* | dragonfly*) 2352 # DragonFly does not have aout. When/if they implement a new 2353 # versioning mechanism, adjust this. 2354 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 2355 version_type=freebsd-$objformat 2356 case $version_type in 2357 freebsd-elf*) 2358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2359 need_version=no 2360 need_lib_prefix=no 2361 ;; 2362 freebsd-*) 2363 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2364 need_version=yes 2365 ;; 2366 esac 2367 shlibpath_var=LD_LIBRARY_PATH 2368 case $host_os in 2369 freebsd2*) 2370 shlibpath_overrides_runpath=yes 2371 ;; 2372 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2373 shlibpath_overrides_runpath=yes 2374 hardcode_into_libs=yes 2375 ;; 2376 *) # from 3.2 on 2377 shlibpath_overrides_runpath=no 2378 hardcode_into_libs=yes 2379 ;; 2380 esac 2381 ;; 2382 2383gnu*) 2384 version_type=linux 2385 need_lib_prefix=no 2386 need_version=no 2387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2388 soname_spec='${libname}${release}${shared_ext}$major' 2389 shlibpath_var=LD_LIBRARY_PATH 2390 hardcode_into_libs=yes 2391 ;; 2392 2393hpux9* | hpux10* | hpux11*) 2394 # Give a soname corresponding to the major version so that dld.sl refuses to 2395 # link against other versions. 2396 version_type=sunos 2397 need_lib_prefix=no 2398 need_version=no 2399 case "$host_cpu" in 2400 ia64*) 2401 shrext_cmds='.so' 2402 hardcode_into_libs=yes 2403 dynamic_linker="$host_os dld.so" 2404 shlibpath_var=LD_LIBRARY_PATH 2405 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2406 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2407 soname_spec='${libname}${release}${shared_ext}$major' 2408 if test "X$HPUX_IA64_MODE" = X32; then 2409 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2410 else 2411 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2412 fi 2413 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2414 ;; 2415 hppa*64*) 2416 shrext_cmds='.sl' 2417 hardcode_into_libs=yes 2418 dynamic_linker="$host_os dld.sl" 2419 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2420 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2421 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2422 soname_spec='${libname}${release}${shared_ext}$major' 2423 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2424 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2425 ;; 2426 *) 2427 shrext_cmds='.sl' 2428 dynamic_linker="$host_os dld.sl" 2429 shlibpath_var=SHLIB_PATH 2430 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2431 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2432 soname_spec='${libname}${release}${shared_ext}$major' 2433 ;; 2434 esac 2435 # HP-UX runs *really* slowly unless shared libraries are mode 555. 2436 postinstall_cmds='chmod 555 $lib' 2437 ;; 2438 2439irix5* | irix6* | nonstopux*) 2440 case $host_os in 2441 nonstopux*) version_type=nonstopux ;; 2442 *) 2443 if test "$lt_cv_prog_gnu_ld" = yes; then 2444 version_type=linux 2445 else 2446 version_type=irix 2447 fi ;; 2448 esac 2449 need_lib_prefix=no 2450 need_version=no 2451 soname_spec='${libname}${release}${shared_ext}$major' 2452 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2453 case $host_os in 2454 irix5* | nonstopux*) 2455 libsuff= shlibsuff= 2456 ;; 2457 *) 2458 case $LD in # libtool.m4 will add one of these switches to LD 2459 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2460 libsuff= shlibsuff= libmagic=32-bit;; 2461 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2462 libsuff=32 shlibsuff=N32 libmagic=N32;; 2463 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2464 libsuff=64 shlibsuff=64 libmagic=64-bit;; 2465 *) libsuff= shlibsuff= libmagic=never-match;; 2466 esac 2467 ;; 2468 esac 2469 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2470 shlibpath_overrides_runpath=no 2471 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2472 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2473 hardcode_into_libs=yes 2474 ;; 2475 2476# No shared lib support for Linux oldld, aout, or coff. 2477linux*oldld* | linux*aout* | linux*coff*) 2478 dynamic_linker=no 2479 ;; 2480 2481# This must be Linux ELF. 2482linux*) 2483 version_type=linux 2484 need_lib_prefix=no 2485 need_version=no 2486 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2487 soname_spec='${libname}${release}${shared_ext}$major' 2488 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2489 shlibpath_var=LD_LIBRARY_PATH 2490 shlibpath_overrides_runpath=no 2491 # This implies no fast_install, which is unacceptable. 2492 # Some rework will be needed to allow for fast_install 2493 # before this can be enabled. 2494 hardcode_into_libs=yes 2495 2496 # find out which ABI we are using 2497 libsuff= 2498 case "$host_cpu" in 2499 x86_64*|s390x*|powerpc64*) 2500 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 2501 if AC_TRY_EVAL(ac_compile); then 2502 case `/usr/bin/file conftest.$ac_objext` in 2503 *64-bit*) 2504 libsuff=64 2505 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 2506 ;; 2507 esac 2508 fi 2509 rm -rf conftest* 2510 ;; 2511 esac 2512 2513 # Append ld.so.conf contents to the search path 2514 if test -f /etc/ld.so.conf; then 2515 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 2516 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" 2517 fi 2518 2519 # We used to test for /lib/ld.so.1 and disable shared libraries on 2520 # powerpc, because MkLinux only supported shared libraries with the 2521 # GNU dynamic linker. Since this was broken with cross compilers, 2522 # most powerpc-linux boxes support dynamic linking these days and 2523 # people can always --disable-shared, the test was removed, and we 2524 # assume the GNU/Linux dynamic linker is in use. 2525 dynamic_linker='GNU/Linux ld.so' 2526 ;; 2527 2528knetbsd*-gnu) 2529 version_type=linux 2530 need_lib_prefix=no 2531 need_version=no 2532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2533 soname_spec='${libname}${release}${shared_ext}$major' 2534 shlibpath_var=LD_LIBRARY_PATH 2535 shlibpath_overrides_runpath=no 2536 hardcode_into_libs=yes 2537 dynamic_linker='GNU ld.so' 2538 ;; 2539 2540netbsd*) 2541 version_type=sunos 2542 need_lib_prefix=no 2543 need_version=no 2544 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 2545 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2546 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2547 dynamic_linker='NetBSD (a.out) ld.so' 2548 else 2549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2550 soname_spec='${libname}${release}${shared_ext}$major' 2551 dynamic_linker='NetBSD ld.elf_so' 2552 fi 2553 shlibpath_var=LD_LIBRARY_PATH 2554 shlibpath_overrides_runpath=yes 2555 hardcode_into_libs=yes 2556 ;; 2557 2558newsos6) 2559 version_type=linux 2560 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2561 shlibpath_var=LD_LIBRARY_PATH 2562 shlibpath_overrides_runpath=yes 2563 ;; 2564 2565nto-qnx*) 2566 version_type=linux 2567 need_lib_prefix=no 2568 need_version=no 2569 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2570 soname_spec='${libname}${release}${shared_ext}$major' 2571 shlibpath_var=LD_LIBRARY_PATH 2572 shlibpath_overrides_runpath=yes 2573 ;; 2574 2575openbsd*) 2576 version_type=sunos 2577 need_lib_prefix=no 2578 need_version=no 2579 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2580 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2581 shlibpath_var=LD_LIBRARY_PATH 2582 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2583 case $host_os in 2584 openbsd2.[[89]] | openbsd2.[[89]].*) 2585 shlibpath_overrides_runpath=no 2586 ;; 2587 *) 2588 shlibpath_overrides_runpath=yes 2589 ;; 2590 esac 2591 else 2592 shlibpath_overrides_runpath=yes 2593 fi 2594 ;; 2595 2596os2*) 2597 libname_spec='$name' 2598 shrext_cmds=".dll" 2599 need_lib_prefix=no 2600 library_names_spec='$libname${shared_ext} $libname.a' 2601 dynamic_linker='OS/2 ld.exe' 2602 shlibpath_var=LIBPATH 2603 ;; 2604 2605osf3* | osf4* | osf5*) 2606 version_type=osf 2607 need_lib_prefix=no 2608 need_version=no 2609 soname_spec='${libname}${release}${shared_ext}$major' 2610 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2611 shlibpath_var=LD_LIBRARY_PATH 2612 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2613 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2614 ;; 2615 2616sco3.2v5*) 2617 version_type=osf 2618 soname_spec='${libname}${release}${shared_ext}$major' 2619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2620 shlibpath_var=LD_LIBRARY_PATH 2621 ;; 2622 2623solaris*) 2624 version_type=linux 2625 need_lib_prefix=no 2626 need_version=no 2627 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2628 soname_spec='${libname}${release}${shared_ext}$major' 2629 shlibpath_var=LD_LIBRARY_PATH 2630 shlibpath_overrides_runpath=yes 2631 hardcode_into_libs=yes 2632 # ldd complains unless libraries are executable 2633 postinstall_cmds='chmod +x $lib' 2634 ;; 2635 2636sunos4*) 2637 version_type=sunos 2638 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2639 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2640 shlibpath_var=LD_LIBRARY_PATH 2641 shlibpath_overrides_runpath=yes 2642 if test "$with_gnu_ld" = yes; then 2643 need_lib_prefix=no 2644 fi 2645 need_version=yes 2646 ;; 2647 2648sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2649 version_type=linux 2650 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2651 soname_spec='${libname}${release}${shared_ext}$major' 2652 shlibpath_var=LD_LIBRARY_PATH 2653 case $host_vendor in 2654 sni) 2655 shlibpath_overrides_runpath=no 2656 need_lib_prefix=no 2657 export_dynamic_flag_spec='${wl}-Blargedynsym' 2658 runpath_var=LD_RUN_PATH 2659 ;; 2660 siemens) 2661 need_lib_prefix=no 2662 ;; 2663 motorola) 2664 need_lib_prefix=no 2665 need_version=no 2666 shlibpath_overrides_runpath=no 2667 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2668 ;; 2669 esac 2670 ;; 2671 2672sysv4*MP*) 2673 if test -d /usr/nec ;then 2674 version_type=linux 2675 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2676 soname_spec='$libname${shared_ext}.$major' 2677 shlibpath_var=LD_LIBRARY_PATH 2678 fi 2679 ;; 2680 2681uts4*) 2682 version_type=linux 2683 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2684 soname_spec='${libname}${release}${shared_ext}$major' 2685 shlibpath_var=LD_LIBRARY_PATH 2686 ;; 2687 2688*) 2689 dynamic_linker=no 2690 ;; 2691esac 2692AC_MSG_RESULT([$dynamic_linker]) 2693test "$dynamic_linker" = no && can_build_shared=no 2694])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 2695 2696 2697# _LT_AC_TAGCONFIG 2698# ---------------- 2699AC_DEFUN([_LT_AC_TAGCONFIG], 2700[AC_ARG_WITH([tags], 2701 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 2702 [include additional configurations @<:@automatic@:>@])], 2703 [tagnames="$withval"]) 2704 2705if test -f "$ltmain" && test -n "$tagnames"; then 2706 if test ! -f "${ofile}"; then 2707 AC_MSG_WARN([output file `$ofile' does not exist]) 2708 fi 2709 2710 if test -z "$LTCC"; then 2711 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 2712 if test -z "$LTCC"; then 2713 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 2714 else 2715 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 2716 fi 2717 fi 2718 2719 # Extract list of available tagged configurations in $ofile. 2720 # Note that this assumes the entire list is on one line. 2721 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 2722 2723 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2724 for tagname in $tagnames; do 2725 IFS="$lt_save_ifs" 2726 # Check whether tagname contains only valid characters 2727 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 2728 "") ;; 2729 *) AC_MSG_ERROR([invalid tag name: $tagname]) 2730 ;; 2731 esac 2732 2733 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 2734 then 2735 AC_MSG_ERROR([tag name \"$tagname\" already exists]) 2736 fi 2737 2738 # Update the list of available tags. 2739 if test -n "$tagname"; then 2740 echo appending configuration tag \"$tagname\" to $ofile 2741 2742 case $tagname in 2743 CXX) 2744 if test -n "$CXX" && ( test "X$CXX" != "Xno" && 2745 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 2746 (test "X$CXX" != "Xg++"))) ; then 2747 AC_LIBTOOL_LANG_CXX_CONFIG 2748 else 2749 tagname="" 2750 fi 2751 ;; 2752 2753 F77) 2754 if test -n "$F77" && test "X$F77" != "Xno"; then 2755 AC_LIBTOOL_LANG_F77_CONFIG 2756 else 2757 tagname="" 2758 fi 2759 ;; 2760 2761 GCJ) 2762 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 2763 AC_LIBTOOL_LANG_GCJ_CONFIG 2764 else 2765 tagname="" 2766 fi 2767 ;; 2768 2769 RC) 2770 AC_LIBTOOL_LANG_RC_CONFIG 2771 ;; 2772 2773 *) 2774 AC_MSG_ERROR([Unsupported tag name: $tagname]) 2775 ;; 2776 esac 2777 2778 # Append the new tag name to the list of available tags. 2779 if test -n "$tagname" ; then 2780 available_tags="$available_tags $tagname" 2781 fi 2782 fi 2783 done 2784 IFS="$lt_save_ifs" 2785 2786 # Now substitute the updated list of available tags. 2787 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 2788 mv "${ofile}T" "$ofile" 2789 chmod +x "$ofile" 2790 else 2791 rm -f "${ofile}T" 2792 AC_MSG_ERROR([unable to update list of available tagged configurations.]) 2793 fi 2794fi 2795])# _LT_AC_TAGCONFIG 2796 2797 2798# AC_LIBTOOL_DLOPEN 2799# ----------------- 2800# enable checks for dlopen support 2801AC_DEFUN([AC_LIBTOOL_DLOPEN], 2802 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 2803])# AC_LIBTOOL_DLOPEN 2804 2805 2806# AC_LIBTOOL_WIN32_DLL 2807# -------------------- 2808# declare package support for building win32 dll's 2809AC_DEFUN([AC_LIBTOOL_WIN32_DLL], 2810[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 2811])# AC_LIBTOOL_WIN32_DLL 2812 2813 2814# AC_ENABLE_SHARED([DEFAULT]) 2815# --------------------------- 2816# implement the --enable-shared flag 2817# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2818AC_DEFUN([AC_ENABLE_SHARED], 2819[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 2820AC_ARG_ENABLE([shared], 2821 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 2822 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 2823 [p=${PACKAGE-default} 2824 case $enableval in 2825 yes) enable_shared=yes ;; 2826 no) enable_shared=no ;; 2827 *) 2828 enable_shared=no 2829 # Look at the argument we got. We use all the common list separators. 2830 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2831 for pkg in $enableval; do 2832 IFS="$lt_save_ifs" 2833 if test "X$pkg" = "X$p"; then 2834 enable_shared=yes 2835 fi 2836 done 2837 IFS="$lt_save_ifs" 2838 ;; 2839 esac], 2840 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 2841])# AC_ENABLE_SHARED 2842 2843 2844# AC_DISABLE_SHARED 2845# ----------------- 2846#- set the default shared flag to --disable-shared 2847AC_DEFUN([AC_DISABLE_SHARED], 2848[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2849AC_ENABLE_SHARED(no) 2850])# AC_DISABLE_SHARED 2851 2852 2853# AC_ENABLE_STATIC([DEFAULT]) 2854# --------------------------- 2855# implement the --enable-static flag 2856# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2857AC_DEFUN([AC_ENABLE_STATIC], 2858[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 2859AC_ARG_ENABLE([static], 2860 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 2861 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 2862 [p=${PACKAGE-default} 2863 case $enableval in 2864 yes) enable_static=yes ;; 2865 no) enable_static=no ;; 2866 *) 2867 enable_static=no 2868 # Look at the argument we got. We use all the common list separators. 2869 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2870 for pkg in $enableval; do 2871 IFS="$lt_save_ifs" 2872 if test "X$pkg" = "X$p"; then 2873 enable_static=yes 2874 fi 2875 done 2876 IFS="$lt_save_ifs" 2877 ;; 2878 esac], 2879 [enable_static=]AC_ENABLE_STATIC_DEFAULT) 2880])# AC_ENABLE_STATIC 2881 2882 2883# AC_DISABLE_STATIC 2884# ----------------- 2885# set the default static flag to --disable-static 2886AC_DEFUN([AC_DISABLE_STATIC], 2887[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2888AC_ENABLE_STATIC(no) 2889])# AC_DISABLE_STATIC 2890 2891 2892# AC_ENABLE_FAST_INSTALL([DEFAULT]) 2893# --------------------------------- 2894# implement the --enable-fast-install flag 2895# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 2896AC_DEFUN([AC_ENABLE_FAST_INSTALL], 2897[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2898AC_ARG_ENABLE([fast-install], 2899 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 2900 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 2901 [p=${PACKAGE-default} 2902 case $enableval in 2903 yes) enable_fast_install=yes ;; 2904 no) enable_fast_install=no ;; 2905 *) 2906 enable_fast_install=no 2907 # Look at the argument we got. We use all the common list separators. 2908 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 2909 for pkg in $enableval; do 2910 IFS="$lt_save_ifs" 2911 if test "X$pkg" = "X$p"; then 2912 enable_fast_install=yes 2913 fi 2914 done 2915 IFS="$lt_save_ifs" 2916 ;; 2917 esac], 2918 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 2919])# AC_ENABLE_FAST_INSTALL 2920 2921 2922# AC_DISABLE_FAST_INSTALL 2923# ----------------------- 2924# set the default to --disable-fast-install 2925AC_DEFUN([AC_DISABLE_FAST_INSTALL], 2926[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2927AC_ENABLE_FAST_INSTALL(no) 2928])# AC_DISABLE_FAST_INSTALL 2929 2930 2931# AC_LIBTOOL_PICMODE([MODE]) 2932# -------------------------- 2933# implement the --with-pic flag 2934# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 2935AC_DEFUN([AC_LIBTOOL_PICMODE], 2936[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2937pic_mode=ifelse($#,1,$1,default) 2938])# AC_LIBTOOL_PICMODE 2939 2940 2941# AC_PROG_EGREP 2942# ------------- 2943# This is predefined starting with Autoconf 2.54, so this conditional 2944# definition can be removed once we require Autoconf 2.54 or later. 2945m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 2946[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 2947 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 2948 then ac_cv_prog_egrep='grep -E' 2949 else ac_cv_prog_egrep='egrep' 2950 fi]) 2951 EGREP=$ac_cv_prog_egrep 2952 AC_SUBST([EGREP]) 2953])]) 2954 2955 2956# AC_PATH_TOOL_PREFIX 2957# ------------------- 2958# find a file program which can recognise shared library 2959AC_DEFUN([AC_PATH_TOOL_PREFIX], 2960[AC_REQUIRE([AC_PROG_EGREP])dnl 2961AC_MSG_CHECKING([for $1]) 2962AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2963[case $MAGIC_CMD in 2964[[\\/*] | ?:[\\/]*]) 2965 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2966 ;; 2967*) 2968 lt_save_MAGIC_CMD="$MAGIC_CMD" 2969 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2970dnl $ac_dummy forces splitting on constant user-supplied paths. 2971dnl POSIX.2 word splitting is done only on the output of word expansions, 2972dnl not every word. This closes a longstanding sh security hole. 2973 ac_dummy="ifelse([$2], , $PATH, [$2])" 2974 for ac_dir in $ac_dummy; do 2975 IFS="$lt_save_ifs" 2976 test -z "$ac_dir" && ac_dir=. 2977 if test -f $ac_dir/$1; then 2978 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2979 if test -n "$file_magic_test_file"; then 2980 case $deplibs_check_method in 2981 "file_magic "*) 2982 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 2983 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2984 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2985 $EGREP "$file_magic_regex" > /dev/null; then 2986 : 2987 else 2988 cat <<EOF 1>&2 2989 2990*** Warning: the command libtool uses to detect shared libraries, 2991*** $file_magic_cmd, produces output that libtool cannot recognize. 2992*** The result is that libtool may fail to recognize shared libraries 2993*** as such. This will affect the creation of libtool libraries that 2994*** depend on shared libraries, but programs linked with such libtool 2995*** libraries will work regardless of this problem. Nevertheless, you 2996*** may want to report the problem to your system manager and/or to 2997*** bug-libtool@gnu.org 2998 2999EOF 3000 fi ;; 3001 esac 3002 fi 3003 break 3004 fi 3005 done 3006 IFS="$lt_save_ifs" 3007 MAGIC_CMD="$lt_save_MAGIC_CMD" 3008 ;; 3009esac]) 3010MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3011if test -n "$MAGIC_CMD"; then 3012 AC_MSG_RESULT($MAGIC_CMD) 3013else 3014 AC_MSG_RESULT(no) 3015fi 3016])# AC_PATH_TOOL_PREFIX 3017 3018 3019# AC_PATH_MAGIC 3020# ------------- 3021# find a file program which can recognise a shared library 3022AC_DEFUN([AC_PATH_MAGIC], 3023[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3024if test -z "$lt_cv_path_MAGIC_CMD"; then 3025 if test -n "$ac_tool_prefix"; then 3026 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3027 else 3028 MAGIC_CMD=: 3029 fi 3030fi 3031])# AC_PATH_MAGIC 3032 3033 3034# AC_PROG_LD 3035# ---------- 3036# find the pathname to the GNU or non-GNU linker 3037AC_DEFUN([AC_PROG_LD], 3038[AC_ARG_WITH([gnu-ld], 3039 [AC_HELP_STRING([--with-gnu-ld], 3040 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3041 [test "$withval" = no || with_gnu_ld=yes], 3042 [with_gnu_ld=no]) 3043AC_REQUIRE([LT_AC_PROG_SED])dnl 3044AC_REQUIRE([AC_PROG_CC])dnl 3045AC_REQUIRE([AC_CANONICAL_HOST])dnl 3046AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3047ac_prog=ld 3048if test "$GCC" = yes; then 3049 # Check if gcc -print-prog-name=ld gives a path. 3050 AC_MSG_CHECKING([for ld used by $CC]) 3051 case $host in 3052 *-*-mingw*) 3053 # gcc leaves a trailing carriage return which upsets mingw 3054 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3055 *) 3056 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3057 esac 3058 case $ac_prog in 3059 # Accept absolute paths. 3060 [[\\/]]* | ?:[[\\/]]*) 3061 re_direlt='/[[^/]][[^/]]*/\.\./' 3062 # Canonicalize the pathname of ld 3063 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 3064 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 3065 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 3066 done 3067 test -z "$LD" && LD="$ac_prog" 3068 ;; 3069 "") 3070 # If it fails, then pretend we aren't using GCC. 3071 ac_prog=ld 3072 ;; 3073 *) 3074 # If it is relative, then search for the first ld in PATH. 3075 with_gnu_ld=unknown 3076 ;; 3077 esac 3078elif test "$with_gnu_ld" = yes; then 3079 AC_MSG_CHECKING([for GNU ld]) 3080else 3081 AC_MSG_CHECKING([for non-GNU ld]) 3082fi 3083AC_CACHE_VAL(lt_cv_path_LD, 3084[if test -z "$LD"; then 3085 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3086 for ac_dir in $PATH; do 3087 IFS="$lt_save_ifs" 3088 test -z "$ac_dir" && ac_dir=. 3089 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3090 lt_cv_path_LD="$ac_dir/$ac_prog" 3091 # Check to see if the program is GNU ld. I'd rather use --version, 3092 # but apparently some GNU ld's only accept -v. 3093 # Break only if it was the GNU/non-GNU ld that we prefer. 3094 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3095 *GNU* | *'with BFD'*) 3096 test "$with_gnu_ld" != no && break 3097 ;; 3098 *) 3099 test "$with_gnu_ld" != yes && break 3100 ;; 3101 esac 3102 fi 3103 done 3104 IFS="$lt_save_ifs" 3105else 3106 lt_cv_path_LD="$LD" # Let the user override the test with a path. 3107fi]) 3108LD="$lt_cv_path_LD" 3109if test -n "$LD"; then 3110 AC_MSG_RESULT($LD) 3111else 3112 AC_MSG_RESULT(no) 3113fi 3114test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115AC_PROG_LD_GNU 3116])# AC_PROG_LD 3117 3118 3119# AC_PROG_LD_GNU 3120# -------------- 3121AC_DEFUN([AC_PROG_LD_GNU], 3122[AC_REQUIRE([AC_PROG_EGREP])dnl 3123AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3124[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 3125case `$LD -v 2>&1 </dev/null` in 3126*GNU* | *'with BFD'*) 3127 lt_cv_prog_gnu_ld=yes 3128 ;; 3129*) 3130 lt_cv_prog_gnu_ld=no 3131 ;; 3132esac]) 3133with_gnu_ld=$lt_cv_prog_gnu_ld 3134])# AC_PROG_LD_GNU 3135 3136 3137# AC_PROG_LD_RELOAD_FLAG 3138# ---------------------- 3139# find reload flag for linker 3140# -- PORTME Some linkers may need a different reload flag. 3141AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 3142[AC_CACHE_CHECK([for $LD option to reload object files], 3143 lt_cv_ld_reload_flag, 3144 [lt_cv_ld_reload_flag='-r']) 3145reload_flag=$lt_cv_ld_reload_flag 3146case $reload_flag in 3147"" | " "*) ;; 3148*) reload_flag=" $reload_flag" ;; 3149esac 3150reload_cmds='$LD$reload_flag -o $output$reload_objs' 3151case $host_os in 3152 darwin*) 3153 if test "$GCC" = yes; then 3154 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' 3155 else 3156 reload_cmds='$LD$reload_flag -o $output$reload_objs' 3157 fi 3158 ;; 3159esac 3160])# AC_PROG_LD_RELOAD_FLAG 3161 3162 3163# AC_DEPLIBS_CHECK_METHOD 3164# ----------------------- 3165# how to check for library dependencies 3166# -- PORTME fill in with the dynamic library characteristics 3167AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 3168[AC_CACHE_CHECK([how to recognise dependent libraries], 3169lt_cv_deplibs_check_method, 3170[lt_cv_file_magic_cmd='$MAGIC_CMD' 3171lt_cv_file_magic_test_file= 3172lt_cv_deplibs_check_method='unknown' 3173# Need to set the preceding variable on all platforms that support 3174# interlibrary dependencies. 3175# 'none' -- dependencies not supported. 3176# `unknown' -- same as none, but documents that we really don't know. 3177# 'pass_all' -- all dependencies passed with no checks. 3178# 'test_compile' -- check by making test program. 3179# 'file_magic [[regex]]' -- check by looking for files in library path 3180# which responds to the $file_magic_cmd with a given extended regex. 3181# If you have `file' or equivalent on your system and you're not sure 3182# whether `pass_all' will *always* work, you probably want this one. 3183 3184case $host_os in 3185aix4* | aix5*) 3186 lt_cv_deplibs_check_method=pass_all 3187 ;; 3188 3189beos*) 3190 lt_cv_deplibs_check_method=pass_all 3191 ;; 3192 3193bsdi[[45]]*) 3194 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3195 lt_cv_file_magic_cmd='/usr/bin/file -L' 3196 lt_cv_file_magic_test_file=/shlib/libc.so 3197 ;; 3198 3199cygwin*) 3200 # func_win32_libid is a shell function defined in ltmain.sh 3201 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3202 lt_cv_file_magic_cmd='func_win32_libid' 3203 ;; 3204 3205mingw* | pw32*) 3206 # Base MSYS/MinGW do not provide the 'file' command needed by 3207 # func_win32_libid shell function, so use a weaker test based on 'objdump'. 3208 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3209 lt_cv_file_magic_cmd='$OBJDUMP -f' 3210 ;; 3211 3212darwin* | rhapsody*) 3213 lt_cv_deplibs_check_method=pass_all 3214 ;; 3215 3216freebsd* | kfreebsd*-gnu | dragonfly*) 3217 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3218 case $host_cpu in 3219 i*86 ) 3220 # Not sure whether the presence of OpenBSD here was a mistake. 3221 # Let's accept both of them until this is cleared up. 3222 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3223 lt_cv_file_magic_cmd=/usr/bin/file 3224 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3225 ;; 3226 esac 3227 else 3228 lt_cv_deplibs_check_method=pass_all 3229 fi 3230 ;; 3231 3232gnu*) 3233 lt_cv_deplibs_check_method=pass_all 3234 ;; 3235 3236hpux10.20* | hpux11*) 3237 lt_cv_file_magic_cmd=/usr/bin/file 3238 case "$host_cpu" in 3239 ia64*) 3240 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3241 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3242 ;; 3243 hppa*64*) 3244 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 3245 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3246 ;; 3247 *) 3248 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3249 lt_cv_file_magic_test_file=/usr/lib/libc.sl 3250 ;; 3251 esac 3252 ;; 3253 3254irix5* | irix6* | nonstopux*) 3255 case $LD in 3256 *-32|*"-32 ") libmagic=32-bit;; 3257 *-n32|*"-n32 ") libmagic=N32;; 3258 *-64|*"-64 ") libmagic=64-bit;; 3259 *) libmagic=never-match;; 3260 esac 3261 lt_cv_deplibs_check_method=pass_all 3262 ;; 3263 3264# This must be Linux ELF. 3265linux*) 3266 lt_cv_deplibs_check_method=pass_all 3267 ;; 3268 3269netbsd*) 3270 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 3271 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3272 else 3273 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3274 fi 3275 ;; 3276 3277newos6*) 3278 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3279 lt_cv_file_magic_cmd=/usr/bin/file 3280 lt_cv_file_magic_test_file=/usr/lib/libnls.so 3281 ;; 3282 3283nto-qnx*) 3284 lt_cv_deplibs_check_method=unknown 3285 ;; 3286 3287openbsd*) 3288 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3289 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3290 else 3291 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3292 fi 3293 ;; 3294 3295osf3* | osf4* | osf5*) 3296 lt_cv_deplibs_check_method=pass_all 3297 ;; 3298 3299sco3.2v5*) 3300 lt_cv_deplibs_check_method=pass_all 3301 ;; 3302 3303solaris*) 3304 lt_cv_deplibs_check_method=pass_all 3305 ;; 3306 3307sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 3308 case $host_vendor in 3309 motorola) 3310 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]]' 3311 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3312 ;; 3313 ncr) 3314 lt_cv_deplibs_check_method=pass_all 3315 ;; 3316 sequent) 3317 lt_cv_file_magic_cmd='/bin/file' 3318 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3319 ;; 3320 sni) 3321 lt_cv_file_magic_cmd='/bin/file' 3322 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3323 lt_cv_file_magic_test_file=/lib/libc.so 3324 ;; 3325 siemens) 3326 lt_cv_deplibs_check_method=pass_all 3327 ;; 3328 esac 3329 ;; 3330 3331sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) 3332 lt_cv_deplibs_check_method=pass_all 3333 ;; 3334esac 3335]) 3336file_magic_cmd=$lt_cv_file_magic_cmd 3337deplibs_check_method=$lt_cv_deplibs_check_method 3338test -z "$deplibs_check_method" && deplibs_check_method=unknown 3339])# AC_DEPLIBS_CHECK_METHOD 3340 3341 3342# AC_PROG_NM 3343# ---------- 3344# find the pathname to a BSD-compatible name lister 3345AC_DEFUN([AC_PROG_NM], 3346[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 3347[if test -n "$NM"; then 3348 # Let the user override the test. 3349 lt_cv_path_NM="$NM" 3350else 3351 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3352 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 3353 IFS="$lt_save_ifs" 3354 test -z "$ac_dir" && ac_dir=. 3355 tmp_nm="$ac_dir/${ac_tool_prefix}nm" 3356 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3357 # Check to see if the nm accepts a BSD-compat flag. 3358 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3359 # nm: unknown option "B" ignored 3360 # Tru64's nm complains that /dev/null is an invalid object file 3361 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3362 */dev/null* | *'Invalid file or object type'*) 3363 lt_cv_path_NM="$tmp_nm -B" 3364 break 3365 ;; 3366 *) 3367 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3368 */dev/null*) 3369 lt_cv_path_NM="$tmp_nm -p" 3370 break 3371 ;; 3372 *) 3373 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3374 continue # so that we can try to find one that supports BSD flags 3375 ;; 3376 esac 3377 esac 3378 fi 3379 done 3380 IFS="$lt_save_ifs" 3381 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 3382fi]) 3383NM="$lt_cv_path_NM" 3384])# AC_PROG_NM 3385 3386 3387# AC_CHECK_LIBM 3388# ------------- 3389# check for math library 3390AC_DEFUN([AC_CHECK_LIBM], 3391[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3392LIBM= 3393case $host in 3394*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3395 # These system don't have libm, or don't need it 3396 ;; 3397*-ncr-sysv4.3*) 3398 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3399 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3400 ;; 3401*) 3402 AC_CHECK_LIB(m, cos, LIBM="-lm") 3403 ;; 3404esac 3405])# AC_CHECK_LIBM 3406 3407 3408# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 3409# ----------------------------------- 3410# sets LIBLTDL to the link flags for the libltdl convenience library and 3411# LTDLINCL to the include flags for the libltdl header and adds 3412# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL 3413# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 3414# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will 3415# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with 3416# '${top_srcdir}/' (note the single quotes!). If your package is not 3417# flat and you're not using automake, define top_builddir and 3418# top_srcdir appropriately in the Makefiles. 3419AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 3420[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3421 case $enable_ltdl_convenience in 3422 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 3423 "") enable_ltdl_convenience=yes 3424 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 3425 esac 3426 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 3427 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3428 # For backwards non-gettext consistent compatibility... 3429 INCLTDL="$LTDLINCL" 3430])# AC_LIBLTDL_CONVENIENCE 3431 3432 3433# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 3434# ----------------------------------- 3435# sets LIBLTDL to the link flags for the libltdl installable library and 3436# LTDLINCL to the include flags for the libltdl header and adds 3437# --enable-ltdl-install to the configure arguments. Note that LIBLTDL 3438# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 3439# DIRECTORY is not provided and an installed libltdl is not found, it is 3440# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' 3441# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single 3442# quotes!). If your package is not flat and you're not using automake, 3443# define top_builddir and top_srcdir appropriately in the Makefiles. 3444# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 3445AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 3446[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3447 AC_CHECK_LIB(ltdl, lt_dlinit, 3448 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 3449 [if test x"$enable_ltdl_install" = xno; then 3450 AC_MSG_WARN([libltdl not installed, but installation disabled]) 3451 else 3452 enable_ltdl_install=yes 3453 fi 3454 ]) 3455 if test x"$enable_ltdl_install" = x"yes"; then 3456 ac_configure_args="$ac_configure_args --enable-ltdl-install" 3457 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 3458 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3459 else 3460 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 3461 LIBLTDL="-lltdl" 3462 LTDLINCL= 3463 fi 3464 # For backwards non-gettext consistent compatibility... 3465 INCLTDL="$LTDLINCL" 3466])# AC_LIBLTDL_INSTALLABLE 3467 3468 3469# AC_LIBTOOL_CXX 3470# -------------- 3471# enable support for C++ libraries 3472AC_DEFUN([AC_LIBTOOL_CXX], 3473[AC_REQUIRE([_LT_AC_LANG_CXX]) 3474])# AC_LIBTOOL_CXX 3475 3476 3477# _LT_AC_LANG_CXX 3478# --------------- 3479AC_DEFUN([_LT_AC_LANG_CXX], 3480[AC_REQUIRE([AC_PROG_CXX]) 3481AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3482_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 3483])# _LT_AC_LANG_CXX 3484 3485# _LT_AC_PROG_CXXCPP 3486# --------------- 3487AC_DEFUN([_LT_AC_PROG_CXXCPP], 3488[ 3489AC_REQUIRE([AC_PROG_CXX]) 3490if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3491 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3492 (test "X$CXX" != "Xg++"))) ; then 3493 AC_PROG_CXXCPP 3494fi 3495])# _LT_AC_PROG_CXXCPP 3496 3497# AC_LIBTOOL_F77 3498# -------------- 3499# enable support for Fortran 77 libraries 3500AC_DEFUN([AC_LIBTOOL_F77], 3501[AC_REQUIRE([_LT_AC_LANG_F77]) 3502])# AC_LIBTOOL_F77 3503 3504 3505# _LT_AC_LANG_F77 3506# --------------- 3507AC_DEFUN([_LT_AC_LANG_F77], 3508[AC_REQUIRE([AC_PROG_F77]) 3509_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 3510])# _LT_AC_LANG_F77 3511 3512 3513# AC_LIBTOOL_GCJ 3514# -------------- 3515# enable support for GCJ libraries 3516AC_DEFUN([AC_LIBTOOL_GCJ], 3517[AC_REQUIRE([_LT_AC_LANG_GCJ]) 3518])# AC_LIBTOOL_GCJ 3519 3520 3521# _LT_AC_LANG_GCJ 3522# --------------- 3523AC_DEFUN([_LT_AC_LANG_GCJ], 3524[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 3525 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 3526 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 3527 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 3528 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 3529 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 3530_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 3531])# _LT_AC_LANG_GCJ 3532 3533 3534# AC_LIBTOOL_RC 3535# -------------- 3536# enable support for Windows resource files 3537AC_DEFUN([AC_LIBTOOL_RC], 3538[AC_REQUIRE([LT_AC_PROG_RC]) 3539_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 3540])# AC_LIBTOOL_RC 3541 3542 3543# AC_LIBTOOL_LANG_C_CONFIG 3544# ------------------------ 3545# Ensure that the configuration vars for the C compiler are 3546# suitably defined. Those variables are subsequently used by 3547# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3548AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 3549AC_DEFUN([_LT_AC_LANG_C_CONFIG], 3550[lt_save_CC="$CC" 3551AC_LANG_PUSH(C) 3552 3553# Source file extension for C test sources. 3554ac_ext=c 3555 3556# Object file extension for compiled C test sources. 3557objext=o 3558_LT_AC_TAGVAR(objext, $1)=$objext 3559 3560# Code to be used in simple compile tests 3561lt_simple_compile_test_code="int some_variable = 0;\n" 3562 3563# Code to be used in simple link tests 3564lt_simple_link_test_code='int main(){return(0);}\n' 3565 3566_LT_AC_SYS_COMPILER 3567 3568# save warnings/boilerplate of simple test code 3569_LT_COMPILER_BOILERPLATE 3570_LT_LINKER_BOILERPLATE 3571 3572# 3573# Check for any special shared library compilation flags. 3574# 3575_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= 3576if test "$GCC" = no; then 3577 case $host_os in 3578 sco3.2v5*) 3579 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' 3580 ;; 3581 esac 3582fi 3583if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then 3584 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) 3585 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : 3586 else 3587 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) 3588 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no 3589 fi 3590fi 3591 3592 3593# 3594# Check to make sure the static flag actually works. 3595# 3596AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], 3597 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 3598 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), 3599 [], 3600 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 3601 3602 3603AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 3604AC_LIBTOOL_PROG_COMPILER_PIC($1) 3605AC_LIBTOOL_PROG_CC_C_O($1) 3606AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 3607AC_LIBTOOL_PROG_LD_SHLIBS($1) 3608AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 3609AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 3610AC_LIBTOOL_SYS_LIB_STRIP 3611AC_LIBTOOL_DLOPEN_SELF($1) 3612 3613# Report which librarie types wil actually be built 3614AC_MSG_CHECKING([if libtool supports shared libraries]) 3615AC_MSG_RESULT([$can_build_shared]) 3616 3617AC_MSG_CHECKING([whether to build shared libraries]) 3618test "$can_build_shared" = "no" && enable_shared=no 3619 3620# On AIX, shared libraries and static libraries use the same namespace, and 3621# are all built from PIC. 3622case "$host_os" in 3623aix3*) 3624 test "$enable_shared" = yes && enable_static=no 3625 if test -n "$RANLIB"; then 3626 archive_cmds="$archive_cmds~\$RANLIB \$lib" 3627 postinstall_cmds='$RANLIB $lib' 3628 fi 3629 ;; 3630 3631aix4* | aix5*) 3632 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 3633 test "$enable_shared" = yes && enable_static=no 3634 fi 3635 ;; 3636esac 3637AC_MSG_RESULT([$enable_shared]) 3638 3639AC_MSG_CHECKING([whether to build static libraries]) 3640# Make sure either enable_shared or enable_static is yes. 3641test "$enable_shared" = yes || enable_static=yes 3642AC_MSG_RESULT([$enable_static]) 3643 3644AC_LIBTOOL_CONFIG($1) 3645 3646AC_LANG_POP 3647CC="$lt_save_CC" 3648])# AC_LIBTOOL_LANG_C_CONFIG 3649 3650 3651# AC_LIBTOOL_LANG_CXX_CONFIG 3652# -------------------------- 3653# Ensure that the configuration vars for the C compiler are 3654# suitably defined. Those variables are subsequently used by 3655# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 3656AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 3657AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 3658[AC_LANG_PUSH(C++) 3659AC_REQUIRE([AC_PROG_CXX]) 3660AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 3661 3662_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3663_LT_AC_TAGVAR(allow_undefined_flag, $1)= 3664_LT_AC_TAGVAR(always_export_symbols, $1)=no 3665_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 3666_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 3667_LT_AC_TAGVAR(hardcode_direct, $1)=no 3668_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 3669_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 3670_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3671_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 3672_LT_AC_TAGVAR(hardcode_automatic, $1)=no 3673_LT_AC_TAGVAR(module_cmds, $1)= 3674_LT_AC_TAGVAR(module_expsym_cmds, $1)= 3675_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 3676_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 3677_LT_AC_TAGVAR(no_undefined_flag, $1)= 3678_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3679_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 3680 3681# Dependencies to place before and after the object being linked: 3682_LT_AC_TAGVAR(predep_objects, $1)= 3683_LT_AC_TAGVAR(postdep_objects, $1)= 3684_LT_AC_TAGVAR(predeps, $1)= 3685_LT_AC_TAGVAR(postdeps, $1)= 3686_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 3687 3688# Source file extension for C++ test sources. 3689ac_ext=cc 3690 3691# Object file extension for compiled C++ test sources. 3692objext=o 3693_LT_AC_TAGVAR(objext, $1)=$objext 3694 3695# Code to be used in simple compile tests 3696lt_simple_compile_test_code="int some_variable = 0;\n" 3697 3698# Code to be used in simple link tests 3699lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' 3700 3701# ltmain only uses $CC for tagged configurations so make sure $CC is set. 3702_LT_AC_SYS_COMPILER 3703 3704# save warnings/boilerplate of simple test code 3705_LT_COMPILER_BOILERPLATE 3706_LT_LINKER_BOILERPLATE 3707 3708# Allow CC to be a program name with arguments. 3709lt_save_CC=$CC 3710lt_save_LD=$LD 3711lt_save_GCC=$GCC 3712GCC=$GXX 3713lt_save_with_gnu_ld=$with_gnu_ld 3714lt_save_path_LD=$lt_cv_path_LD 3715if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 3716 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 3717else 3718 unset lt_cv_prog_gnu_ld 3719fi 3720if test -n "${lt_cv_path_LDCXX+set}"; then 3721 lt_cv_path_LD=$lt_cv_path_LDCXX 3722else 3723 unset lt_cv_path_LD 3724fi 3725test -z "${LDCXX+set}" || LD=$LDCXX 3726CC=${CXX-"c++"} 3727compiler=$CC 3728_LT_AC_TAGVAR(compiler, $1)=$CC 3729_LT_CC_BASENAME([$compiler]) 3730 3731# We don't want -fno-exception wen compiling C++ code, so set the 3732# no_builtin_flag separately 3733if test "$GXX" = yes; then 3734 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3735else 3736 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3737fi 3738 3739if test "$GXX" = yes; then 3740 # Set up default GNU C++ configuration 3741 3742 AC_PROG_LD 3743 3744 # Check if GNU C++ uses GNU ld as the underlying linker, since the 3745 # archiving commands below assume that GNU ld is being used. 3746 if test "$with_gnu_ld" = yes; then 3747 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 3748 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 3749 3750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 3751 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 3752 3753 # If archive_cmds runs LD, not CC, wlarc should be empty 3754 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 3755 # investigate it a little bit more. (MM) 3756 wlarc='${wl}' 3757 3758 # ancient GNU ld didn't support --whole-archive et. al. 3759 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 3760 grep 'no-whole-archive' > /dev/null; then 3761 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 3762 else 3763 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 3764 fi 3765 else 3766 with_gnu_ld=no 3767 wlarc= 3768 3769 # A generic and very simple default shared library creation 3770 # command for GNU C++ for the case where it uses the native 3771 # linker, instead of GNU ld. If possible, this setting should 3772 # overridden to take advantage of the native linker features on 3773 # the platform it is being used on. 3774 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 3775 fi 3776 3777 # Commands to make compiler produce verbose output that lists 3778 # what "hidden" libraries, object files and flags are used when 3779 # linking a shared library. 3780 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 3781 3782else 3783 GXX=no 3784 with_gnu_ld=no 3785 wlarc= 3786fi 3787 3788# PORTME: fill in a description of your system's C++ link characteristics 3789AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 3790_LT_AC_TAGVAR(ld_shlibs, $1)=yes 3791case $host_os in 3792 aix3*) 3793 # FIXME: insert proper C++ library support 3794 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3795 ;; 3796 aix4* | aix5*) 3797 if test "$host_cpu" = ia64; then 3798 # On IA64, the linker does run time linking by default, so we don't 3799 # have to do anything special. 3800 aix_use_runtimelinking=no 3801 exp_sym_flag='-Bexport' 3802 no_entry_flag="" 3803 else 3804 aix_use_runtimelinking=no 3805 3806 # Test if we are trying to use run time linking or normal 3807 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 3808 # need to do runtime linking. 3809 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 3810 for ld_flag in $LDFLAGS; do 3811 case $ld_flag in 3812 *-brtl*) 3813 aix_use_runtimelinking=yes 3814 break 3815 ;; 3816 esac 3817 done 3818 esac 3819 3820 exp_sym_flag='-bexport' 3821 no_entry_flag='-bnoentry' 3822 fi 3823 3824 # When large executables or shared objects are built, AIX ld can 3825 # have problems creating the table of contents. If linking a library 3826 # or program results in "error TOC overflow" add -mminimal-toc to 3827 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 3828 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 3829 3830 _LT_AC_TAGVAR(archive_cmds, $1)='' 3831 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3832 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 3833 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3834 3835 if test "$GXX" = yes; then 3836 case $host_os in aix4.[[012]]|aix4.[[012]].*) 3837 # We only want to do this on AIX 4.2 and lower, the check 3838 # below for broken collect2 doesn't work under 4.3+ 3839 collect2name=`${CC} -print-prog-name=collect2` 3840 if test -f "$collect2name" && \ 3841 strings "$collect2name" | grep resolve_lib_name >/dev/null 3842 then 3843 # We have reworked collect2 3844 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 3845 else 3846 # We have old collect2 3847 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 3848 # It fails to find uninstalled libraries when the uninstalled 3849 # path is not listed in the libpath. Setting hardcode_minus_L 3850 # to unsupported forces relinking 3851 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 3852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3853 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 3854 fi 3855 esac 3856 shared_flag='-shared' 3857 if test "$aix_use_runtimelinking" = yes; then 3858 shared_flag="$shared_flag "'${wl}-G' 3859 fi 3860 else 3861 # not using gcc 3862 if test "$host_cpu" = ia64; then 3863 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 3864 # chokes on -Wl,-G. The following line is correct: 3865 shared_flag='-G' 3866 else 3867 if test "$aix_use_runtimelinking" = yes; then 3868 shared_flag='${wl}-G' 3869 else 3870 shared_flag='${wl}-bM:SRE' 3871 fi 3872 fi 3873 fi 3874 3875 # It seems that -bexpall does not export symbols beginning with 3876 # underscore (_), so it is better to generate a list of symbols to export. 3877 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3878 if test "$aix_use_runtimelinking" = yes; then 3879 # Warning - without using the other runtime loading flags (-brtl), 3880 # -berok will link without error, but may produce a broken library. 3881 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 3882 # Determine the default libpath from the value encoded in an empty executable. 3883 _LT_AC_SYS_LIBPATH_AIX 3884 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3885 3886 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" 3887 else 3888 if test "$host_cpu" = ia64; then 3889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 3890 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 3891 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 3892 else 3893 # Determine the default libpath from the value encoded in an empty executable. 3894 _LT_AC_SYS_LIBPATH_AIX 3895 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 3896 # Warning - without using the other run time loading flags, 3897 # -berok will link without error, but may produce a broken library. 3898 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 3899 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 3900 # -bexpall does not export symbols beginning with underscore (_) 3901 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 3902 # Exported symbols can be pulled into shared objects from archives 3903 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 3904 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 3905 # This is similar to how AIX traditionally builds it's shared libraries. 3906 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 3907 fi 3908 fi 3909 ;; 3910 chorus*) 3911 case $cc_basename in 3912 *) 3913 # FIXME: insert proper C++ library support 3914 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3915 ;; 3916 esac 3917 ;; 3918 3919 3920 cygwin* | mingw* | pw32*) 3921 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 3922 # as there is no search path for DLLs. 3923 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 3924 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 3925 _LT_AC_TAGVAR(always_export_symbols, $1)=no 3926 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 3927 3928 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 3929 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 3930 # If the export-symbols file already is a .def file (1st line 3931 # is EXPORTS), use it as is; otherwise, prepend... 3932 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 3933 cp $export_symbols $output_objdir/$soname.def; 3934 else 3935 echo EXPORTS > $output_objdir/$soname.def; 3936 cat $export_symbols >> $output_objdir/$soname.def; 3937 fi~ 3938 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 3939 else 3940 _LT_AC_TAGVAR(ld_shlibs, $1)=no 3941 fi 3942 ;; 3943 darwin* | rhapsody*) 3944 case "$host_os" in 3945 rhapsody* | darwin1.[[012]]) 3946 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 3947 ;; 3948 *) # Darwin 1.3 on 3949 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 3950 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3951 else 3952 case ${MACOSX_DEPLOYMENT_TARGET} in 3953 10.[[012]]) 3954 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 3955 ;; 3956 10.*) 3957 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 3958 ;; 3959 esac 3960 fi 3961 ;; 3962 esac 3963 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 3964 _LT_AC_TAGVAR(hardcode_direct, $1)=no 3965 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 3966 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3967 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 3968 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 3969 3970 if test "$GXX" = yes ; then 3971 lt_int_apple_cc_single_mod=no 3972 output_verbose_link_cmd='echo' 3973 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 3974 lt_int_apple_cc_single_mod=yes 3975 fi 3976 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3977 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3978 else 3979 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 3980 fi 3981 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3982 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 3983 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 3984 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3985 else 3986 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3987 fi 3988 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3989 else 3990 case $cc_basename in 3991 xlc*) 3992 output_verbose_link_cmd='echo' 3993 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 3994 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 3995 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 3996 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3997 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 3998 ;; 3999 *) 4000 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4001 ;; 4002 esac 4003 fi 4004 ;; 4005 4006 dgux*) 4007 case $cc_basename in 4008 ec++*) 4009 # FIXME: insert proper C++ library support 4010 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4011 ;; 4012 ghcx*) 4013 # Green Hills C++ Compiler 4014 # FIXME: insert proper C++ library support 4015 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4016 ;; 4017 *) 4018 # FIXME: insert proper C++ library support 4019 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4020 ;; 4021 esac 4022 ;; 4023 freebsd[[12]]*) 4024 # C++ shared libraries reported to be fairly broken before switch to ELF 4025 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4026 ;; 4027 freebsd-elf*) 4028 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4029 ;; 4030 freebsd* | kfreebsd*-gnu | dragonfly*) 4031 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 4032 # conventions 4033 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 4034 ;; 4035 gnu*) 4036 ;; 4037 hpux9*) 4038 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4039 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4040 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4041 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4042 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4043 # but as the default 4044 # location of the library. 4045 4046 case $cc_basename in 4047 CC*) 4048 # FIXME: insert proper C++ library support 4049 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4050 ;; 4051 aCC*) 4052 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4053 # Commands to make compiler produce verbose output that lists 4054 # what "hidden" libraries, object files and flags are used when 4055 # linking a shared library. 4056 # 4057 # There doesn't appear to be a way to prevent this compiler from 4058 # explicitly linking system object files so we need to strip them 4059 # from the output so that they don't get included in the library 4060 # dependencies. 4061 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4062 ;; 4063 *) 4064 if test "$GXX" = yes; then 4065 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4066 else 4067 # FIXME: insert proper C++ library support 4068 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4069 fi 4070 ;; 4071 esac 4072 ;; 4073 hpux10*|hpux11*) 4074 if test $with_gnu_ld = no; then 4075 case "$host_cpu" in 4076 hppa*64*) 4077 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4078 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4079 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4080 ;; 4081 ia64*) 4082 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4083 ;; 4084 *) 4085 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4086 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4087 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4088 ;; 4089 esac 4090 fi 4091 case "$host_cpu" in 4092 hppa*64*) 4093 _LT_AC_TAGVAR(hardcode_direct, $1)=no 4094 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4095 ;; 4096 ia64*) 4097 _LT_AC_TAGVAR(hardcode_direct, $1)=no 4098 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4099 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4100 # but as the default 4101 # location of the library. 4102 ;; 4103 *) 4104 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4105 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 4106 # but as the default 4107 # location of the library. 4108 ;; 4109 esac 4110 4111 case $cc_basename in 4112 CC*) 4113 # FIXME: insert proper C++ library support 4114 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4115 ;; 4116 aCC*) 4117 case "$host_cpu" in 4118 hppa*64*|ia64*) 4119 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 4120 ;; 4121 *) 4122 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4123 ;; 4124 esac 4125 # Commands to make compiler produce verbose output that lists 4126 # what "hidden" libraries, object files and flags are used when 4127 # linking a shared library. 4128 # 4129 # There doesn't appear to be a way to prevent this compiler from 4130 # explicitly linking system object files so we need to strip them 4131 # from the output so that they don't get included in the library 4132 # dependencies. 4133 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4134 ;; 4135 *) 4136 if test "$GXX" = yes; then 4137 if test $with_gnu_ld = no; then 4138 case "$host_cpu" in 4139 ia64*|hppa*64*) 4140 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 4141 ;; 4142 *) 4143 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4144 ;; 4145 esac 4146 fi 4147 else 4148 # FIXME: insert proper C++ library support 4149 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4150 fi 4151 ;; 4152 esac 4153 ;; 4154 irix5* | irix6*) 4155 case $cc_basename in 4156 CC*) 4157 # SGI C++ 4158 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4159 4160 # Archives containing C++ object files must be created using 4161 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 4162 # necessary to make sure instantiated templates are included 4163 # in the archive. 4164 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 4165 ;; 4166 *) 4167 if test "$GXX" = yes; then 4168 if test "$with_gnu_ld" = no; then 4169 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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' 4170 else 4171 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 4172 fi 4173 fi 4174 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4175 ;; 4176 esac 4177 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4178 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4179 ;; 4180 linux*) 4181 case $cc_basename in 4182 KCC*) 4183 # Kuck and Associates, Inc. (KAI) C++ Compiler 4184 4185 # KCC will only create a shared library if the output file 4186 # ends with ".so" (or ".sl" for HP-UX), so rename the library 4187 # to its proper name (with version) after linking. 4188 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 4189 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' 4190 # Commands to make compiler produce verbose output that lists 4191 # what "hidden" libraries, object files and flags are used when 4192 # linking a shared library. 4193 # 4194 # There doesn't appear to be a way to prevent this compiler from 4195 # explicitly linking system object files so we need to strip them 4196 # from the output so that they don't get included in the library 4197 # dependencies. 4198 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4199 4200 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 4201 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4202 4203 # Archives containing C++ object files must be created using 4204 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4205 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4206 ;; 4207 icpc*) 4208 # Intel C++ 4209 with_gnu_ld=yes 4210 # version 8.0 and above of icpc choke on multiply defined symbols 4211 # if we add $predep_objects and $postdep_objects, however 7.1 and 4212 # earlier do not add the objects themselves. 4213 case `$CC -V 2>&1` in 4214 *"Version 7."*) 4215 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4216 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4217 ;; 4218 *) # Version 8.0 or newer 4219 tmp_idyn= 4220 case $host_cpu in 4221 ia64*) tmp_idyn=' -i_dynamic';; 4222 esac 4223 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4224 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 4225 ;; 4226 esac 4227 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4228 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4229 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4230 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 4231 ;; 4232 pgCC*) 4233 # Portland Group C++ compiler 4234 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 4235 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 4236 4237 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4238 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4239 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 4240 ;; 4241 cxx*) 4242 # Compaq C++ 4243 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4244 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' 4245 4246 runpath_var=LD_RUN_PATH 4247 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4248 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4249 4250 # Commands to make compiler produce verbose output that lists 4251 # what "hidden" libraries, object files and flags are used when 4252 # linking a shared library. 4253 # 4254 # There doesn't appear to be a way to prevent this compiler from 4255 # explicitly linking system object files so we need to strip them 4256 # from the output so that they don't get included in the library 4257 # dependencies. 4258 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4259 ;; 4260 esac 4261 ;; 4262 lynxos*) 4263 # FIXME: insert proper C++ library support 4264 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4265 ;; 4266 m88k*) 4267 # FIXME: insert proper C++ library support 4268 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4269 ;; 4270 mvs*) 4271 case $cc_basename in 4272 cxx*) 4273 # FIXME: insert proper C++ library support 4274 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4275 ;; 4276 *) 4277 # FIXME: insert proper C++ library support 4278 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4279 ;; 4280 esac 4281 ;; 4282 netbsd*) 4283 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 4284 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 4285 wlarc= 4286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4287 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4288 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4289 fi 4290 # Workaround some broken pre-1.5 toolchains 4291 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 4292 ;; 4293 openbsd2*) 4294 # C++ shared libraries are fairly broken 4295 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4296 ;; 4297 openbsd*) 4298 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 4299 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4301 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4302 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4303 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' 4304 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4305 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4306 fi 4307 output_verbose_link_cmd='echo' 4308 ;; 4309 osf3*) 4310 case $cc_basename in 4311 KCC*) 4312 # Kuck and Associates, Inc. (KAI) C++ Compiler 4313 4314 # KCC will only create a shared library if the output file 4315 # ends with ".so" (or ".sl" for HP-UX), so rename the library 4316 # to its proper name (with version) after linking. 4317 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 4318 4319 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4320 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4321 4322 # Archives containing C++ object files must be created using 4323 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 4324 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 4325 4326 ;; 4327 RCC*) 4328 # Rational C++ 2.4.1 4329 # FIXME: insert proper C++ library support 4330 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4331 ;; 4332 cxx*) 4333 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4334 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4335 4336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4337 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4338 4339 # Commands to make compiler produce verbose output that lists 4340 # what "hidden" libraries, object files and flags are used when 4341 # linking a shared library. 4342 # 4343 # There doesn't appear to be a way to prevent this compiler from 4344 # explicitly linking system object files so we need to strip them 4345 # from the output so that they don't get included in the library 4346 # dependencies. 4347 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4348 ;; 4349 *) 4350 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4351 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4352 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' 4353 4354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4355 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4356 4357 # Commands to make compiler produce verbose output that lists 4358 # what "hidden" libraries, object files and flags are used when 4359 # linking a shared library. 4360 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4361 4362 else 4363 # FIXME: insert proper C++ library support 4364 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4365 fi 4366 ;; 4367 esac 4368 ;; 4369 osf4* | osf5*) 4370 case $cc_basename in 4371 KCC*) 4372 # Kuck and Associates, Inc. (KAI) C++ Compiler 4373 4374 # KCC will only create a shared library if the output file 4375 # ends with ".so" (or ".sl" for HP-UX), so rename the library 4376 # to its proper name (with version) after linking. 4377 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 4378 4379 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4380 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4381 4382 # Archives containing C++ object files must be created using 4383 # the KAI C++ compiler. 4384 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 4385 ;; 4386 RCC*) 4387 # Rational C++ 2.4.1 4388 # FIXME: insert proper C++ library support 4389 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4390 ;; 4391 cxx*) 4392 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4393 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 4394 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 4395 echo "-hidden">> $lib.exp~ 4396 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ 4397 $rm $lib.exp' 4398 4399 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4400 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4401 4402 # Commands to make compiler produce verbose output that lists 4403 # what "hidden" libraries, object files and flags are used when 4404 # linking a shared library. 4405 # 4406 # There doesn't appear to be a way to prevent this compiler from 4407 # explicitly linking system object files so we need to strip them 4408 # from the output so that they don't get included in the library 4409 # dependencies. 4410 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4411 ;; 4412 *) 4413 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4414 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' 4416 4417 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4418 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 4419 4420 # Commands to make compiler produce verbose output that lists 4421 # what "hidden" libraries, object files and flags are used when 4422 # linking a shared library. 4423 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4424 4425 else 4426 # FIXME: insert proper C++ library support 4427 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4428 fi 4429 ;; 4430 esac 4431 ;; 4432 psos*) 4433 # FIXME: insert proper C++ library support 4434 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4435 ;; 4436 sco*) 4437 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4438 case $cc_basename in 4439 CC*) 4440 # FIXME: insert proper C++ library support 4441 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4442 ;; 4443 *) 4444 # FIXME: insert proper C++ library support 4445 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4446 ;; 4447 esac 4448 ;; 4449 sunos4*) 4450 case $cc_basename in 4451 CC*) 4452 # Sun C++ 4.x 4453 # FIXME: insert proper C++ library support 4454 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4455 ;; 4456 lcc*) 4457 # Lucid 4458 # FIXME: insert proper C++ library support 4459 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4460 ;; 4461 *) 4462 # FIXME: insert proper C++ library support 4463 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4464 ;; 4465 esac 4466 ;; 4467 solaris*) 4468 case $cc_basename in 4469 CC*) 4470 # Sun C++ 4.2, 5.x and Centerline C++ 4471 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 4472 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 4473 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4474 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4475 4476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4477 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 4478 case $host_os in 4479 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4480 *) 4481 # The C++ compiler is used as linker so we must use $wl 4482 # flag to pass the commands to the underlying system 4483 # linker. We must also pass each convience library through 4484 # to the system linker between allextract/defaultextract. 4485 # The C++ compiler will combine linker options so we 4486 # cannot just pass the convience library names through 4487 # without $wl. 4488 # Supported since Solaris 2.6 (maybe 2.5.1?) 4489 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' 4490 ;; 4491 esac 4492 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 4493 4494 # Commands to make compiler produce verbose output that lists 4495 # what "hidden" libraries, object files and flags are used when 4496 # linking a shared library. 4497 # 4498 # There doesn't appear to be a way to prevent this compiler from 4499 # explicitly linking system object files so we need to strip them 4500 # from the output so that they don't get included in the library 4501 # dependencies. 4502 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 4503 4504 # Archives containing C++ object files must be created using 4505 # "CC -xar", where "CC" is the Sun C++ compiler. This is 4506 # necessary to make sure instantiated templates are included 4507 # in the archive. 4508 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 4509 ;; 4510 gcx*) 4511 # Green Hills C++ Compiler 4512 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4513 4514 # The C++ compiler must be used to create the archive. 4515 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 4516 ;; 4517 *) 4518 # GNU C++ compiler with Solaris linker 4519 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 4520 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 4521 if $CC --version | grep -v '^2\.7' > /dev/null; then 4522 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4523 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4524 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4525 4526 # Commands to make compiler produce verbose output that lists 4527 # what "hidden" libraries, object files and flags are used when 4528 # linking a shared library. 4529 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4530 else 4531 # g++ 2.7 appears to require `-G' NOT `-shared' on this 4532 # platform. 4533 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 4534 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 4535 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 4536 4537 # Commands to make compiler produce verbose output that lists 4538 # what "hidden" libraries, object files and flags are used when 4539 # linking a shared library. 4540 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 4541 fi 4542 4543 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 4544 fi 4545 ;; 4546 esac 4547 ;; 4548 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 4549 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4550 ;; 4551 tandem*) 4552 case $cc_basename in 4553 NCC*) 4554 # NonStop-UX NCC 3.20 4555 # FIXME: insert proper C++ library support 4556 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4557 ;; 4558 *) 4559 # FIXME: insert proper C++ library support 4560 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4561 ;; 4562 esac 4563 ;; 4564 vxworks*) 4565 # FIXME: insert proper C++ library support 4566 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4567 ;; 4568 *) 4569 # FIXME: insert proper C++ library support 4570 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4571 ;; 4572esac 4573AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 4574test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 4575 4576_LT_AC_TAGVAR(GCC, $1)="$GXX" 4577_LT_AC_TAGVAR(LD, $1)="$LD" 4578 4579AC_LIBTOOL_POSTDEP_PREDEP($1) 4580AC_LIBTOOL_PROG_COMPILER_PIC($1) 4581AC_LIBTOOL_PROG_CC_C_O($1) 4582AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4583AC_LIBTOOL_PROG_LD_SHLIBS($1) 4584AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4585AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4586AC_LIBTOOL_SYS_LIB_STRIP 4587AC_LIBTOOL_DLOPEN_SELF($1) 4588 4589AC_LIBTOOL_CONFIG($1) 4590 4591AC_LANG_POP 4592CC=$lt_save_CC 4593LDCXX=$LD 4594LD=$lt_save_LD 4595GCC=$lt_save_GCC 4596with_gnu_ldcxx=$with_gnu_ld 4597with_gnu_ld=$lt_save_with_gnu_ld 4598lt_cv_path_LDCXX=$lt_cv_path_LD 4599lt_cv_path_LD=$lt_save_path_LD 4600lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 4601lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 4602])# AC_LIBTOOL_LANG_CXX_CONFIG 4603 4604# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 4605# ------------------------ 4606# Figure out "hidden" library dependencies from verbose 4607# compiler output when linking a shared library. 4608# Parse the compiler output and extract the necessary 4609# objects, libraries and library flags. 4610AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 4611dnl we can't use the lt_simple_compile_test_code here, 4612dnl because it contains code intended for an executable, 4613dnl not a library. It's possible we should let each 4614dnl tag define a new lt_????_link_test_code variable, 4615dnl but it's only used here... 4616ifelse([$1],[],[cat > conftest.$ac_ext <<EOF 4617int a; 4618void foo (void) { a = 0; } 4619EOF 4620],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 4621class Foo 4622{ 4623public: 4624 Foo (void) { a = 0; } 4625private: 4626 int a; 4627}; 4628EOF 4629],[$1],[F77],[cat > conftest.$ac_ext <<EOF 4630 subroutine foo 4631 implicit none 4632 integer*4 a 4633 a=0 4634 return 4635 end 4636EOF 4637],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 4638public class foo { 4639 private int a; 4640 public void bar (void) { 4641 a = 0; 4642 } 4643}; 4644EOF 4645]) 4646dnl Parse the compiler output and extract the necessary 4647dnl objects, libraries and library flags. 4648if AC_TRY_EVAL(ac_compile); then 4649 # Parse the compiler output and extract the necessary 4650 # objects, libraries and library flags. 4651 4652 # Sentinel used to keep track of whether or not we are before 4653 # the conftest object file. 4654 pre_test_object_deps_done=no 4655 4656 # The `*' in the case matches for architectures that use `case' in 4657 # $output_verbose_cmd can trigger glob expansion during the loop 4658 # eval without this substitution. 4659 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" 4660 4661 for p in `eval $output_verbose_link_cmd`; do 4662 case $p in 4663 4664 -L* | -R* | -l*) 4665 # Some compilers place space between "-{L,R}" and the path. 4666 # Remove the space. 4667 if test $p = "-L" \ 4668 || test $p = "-R"; then 4669 prev=$p 4670 continue 4671 else 4672 prev= 4673 fi 4674 4675 if test "$pre_test_object_deps_done" = no; then 4676 case $p in 4677 -L* | -R*) 4678 # Internal compiler library paths should come after those 4679 # provided the user. The postdeps already come after the 4680 # user supplied libs so there is no need to process them. 4681 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 4682 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 4683 else 4684 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 4685 fi 4686 ;; 4687 # The "-l" case would never come before the object being 4688 # linked, so don't bother handling this case. 4689 esac 4690 else 4691 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 4692 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 4693 else 4694 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 4695 fi 4696 fi 4697 ;; 4698 4699 *.$objext) 4700 # This assumes that the test object file only shows up 4701 # once in the compiler output. 4702 if test "$p" = "conftest.$objext"; then 4703 pre_test_object_deps_done=yes 4704 continue 4705 fi 4706 4707 if test "$pre_test_object_deps_done" = no; then 4708 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 4709 _LT_AC_TAGVAR(predep_objects, $1)="$p" 4710 else 4711 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 4712 fi 4713 else 4714 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 4715 _LT_AC_TAGVAR(postdep_objects, $1)="$p" 4716 else 4717 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 4718 fi 4719 fi 4720 ;; 4721 4722 *) ;; # Ignore the rest. 4723 4724 esac 4725 done 4726 4727 # Clean up. 4728 rm -f a.out a.exe 4729else 4730 echo "libtool.m4: error: problem compiling $1 test program" 4731fi 4732 4733$rm -f confest.$objext 4734 4735case " $_LT_AC_TAGVAR(postdeps, $1) " in 4736*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 4737esac 4738])# AC_LIBTOOL_POSTDEP_PREDEP 4739 4740# AC_LIBTOOL_LANG_F77_CONFIG 4741# ------------------------ 4742# Ensure that the configuration vars for the C compiler are 4743# suitably defined. Those variables are subsequently used by 4744# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4745AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 4746AC_DEFUN([_LT_AC_LANG_F77_CONFIG], 4747[AC_REQUIRE([AC_PROG_F77]) 4748AC_LANG_PUSH(Fortran 77) 4749 4750_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4751_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4752_LT_AC_TAGVAR(always_export_symbols, $1)=no 4753_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4754_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4755_LT_AC_TAGVAR(hardcode_direct, $1)=no 4756_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4757_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4758_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4759_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4760_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4761_LT_AC_TAGVAR(module_cmds, $1)= 4762_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4763_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4764_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4765_LT_AC_TAGVAR(no_undefined_flag, $1)= 4766_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4767_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4768 4769# Source file extension for f77 test sources. 4770ac_ext=f 4771 4772# Object file extension for compiled f77 test sources. 4773objext=o 4774_LT_AC_TAGVAR(objext, $1)=$objext 4775 4776# Code to be used in simple compile tests 4777lt_simple_compile_test_code=" subroutine t\n return\n end\n" 4778 4779# Code to be used in simple link tests 4780lt_simple_link_test_code=" program t\n end\n" 4781 4782# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4783_LT_AC_SYS_COMPILER 4784 4785# save warnings/boilerplate of simple test code 4786_LT_COMPILER_BOILERPLATE 4787_LT_LINKER_BOILERPLATE 4788 4789# Allow CC to be a program name with arguments. 4790lt_save_CC="$CC" 4791CC=${F77-"f77"} 4792compiler=$CC 4793_LT_AC_TAGVAR(compiler, $1)=$CC 4794_LT_CC_BASENAME([$compiler]) 4795 4796AC_MSG_CHECKING([if libtool supports shared libraries]) 4797AC_MSG_RESULT([$can_build_shared]) 4798 4799AC_MSG_CHECKING([whether to build shared libraries]) 4800test "$can_build_shared" = "no" && enable_shared=no 4801 4802# On AIX, shared libraries and static libraries use the same namespace, and 4803# are all built from PIC. 4804case "$host_os" in 4805aix3*) 4806 test "$enable_shared" = yes && enable_static=no 4807 if test -n "$RANLIB"; then 4808 archive_cmds="$archive_cmds~\$RANLIB \$lib" 4809 postinstall_cmds='$RANLIB $lib' 4810 fi 4811 ;; 4812aix4* | aix5*) 4813 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4814 test "$enable_shared" = yes && enable_static=no 4815 fi 4816 ;; 4817esac 4818AC_MSG_RESULT([$enable_shared]) 4819 4820AC_MSG_CHECKING([whether to build static libraries]) 4821# Make sure either enable_shared or enable_static is yes. 4822test "$enable_shared" = yes || enable_static=yes 4823AC_MSG_RESULT([$enable_static]) 4824 4825test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 4826 4827_LT_AC_TAGVAR(GCC, $1)="$G77" 4828_LT_AC_TAGVAR(LD, $1)="$LD" 4829 4830AC_LIBTOOL_PROG_COMPILER_PIC($1) 4831AC_LIBTOOL_PROG_CC_C_O($1) 4832AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4833AC_LIBTOOL_PROG_LD_SHLIBS($1) 4834AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4835AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4836AC_LIBTOOL_SYS_LIB_STRIP 4837 4838 4839AC_LIBTOOL_CONFIG($1) 4840 4841AC_LANG_POP 4842CC="$lt_save_CC" 4843])# AC_LIBTOOL_LANG_F77_CONFIG 4844 4845 4846# AC_LIBTOOL_LANG_GCJ_CONFIG 4847# -------------------------- 4848# Ensure that the configuration vars for the C compiler are 4849# suitably defined. Those variables are subsequently used by 4850# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4851AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 4852AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 4853[AC_LANG_SAVE 4854 4855# Source file extension for Java test sources. 4856ac_ext=java 4857 4858# Object file extension for compiled Java test sources. 4859objext=o 4860_LT_AC_TAGVAR(objext, $1)=$objext 4861 4862# Code to be used in simple compile tests 4863lt_simple_compile_test_code="class foo {}\n" 4864 4865# Code to be used in simple link tests 4866lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 4867 4868# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4869_LT_AC_SYS_COMPILER 4870 4871# save warnings/boilerplate of simple test code 4872_LT_COMPILER_BOILERPLATE 4873_LT_LINKER_BOILERPLATE 4874 4875# Allow CC to be a program name with arguments. 4876lt_save_CC="$CC" 4877CC=${GCJ-"gcj"} 4878compiler=$CC 4879_LT_AC_TAGVAR(compiler, $1)=$CC 4880_LT_CC_BASENAME([$compiler]) 4881 4882# GCJ did not exist at the time GCC didn't implicitly link libc in. 4883_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4884 4885_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4886 4887AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4888AC_LIBTOOL_PROG_COMPILER_PIC($1) 4889AC_LIBTOOL_PROG_CC_C_O($1) 4890AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4891AC_LIBTOOL_PROG_LD_SHLIBS($1) 4892AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4893AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4894AC_LIBTOOL_SYS_LIB_STRIP 4895AC_LIBTOOL_DLOPEN_SELF($1) 4896 4897AC_LIBTOOL_CONFIG($1) 4898 4899AC_LANG_RESTORE 4900CC="$lt_save_CC" 4901])# AC_LIBTOOL_LANG_GCJ_CONFIG 4902 4903 4904# AC_LIBTOOL_LANG_RC_CONFIG 4905# -------------------------- 4906# Ensure that the configuration vars for the Windows resource compiler are 4907# suitably defined. Those variables are subsequently used by 4908# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4909AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 4910AC_DEFUN([_LT_AC_LANG_RC_CONFIG], 4911[AC_LANG_SAVE 4912 4913# Source file extension for RC test sources. 4914ac_ext=rc 4915 4916# Object file extension for compiled RC test sources. 4917objext=o 4918_LT_AC_TAGVAR(objext, $1)=$objext 4919 4920# Code to be used in simple compile tests 4921lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 4922 4923# Code to be used in simple link tests 4924lt_simple_link_test_code="$lt_simple_compile_test_code" 4925 4926# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4927_LT_AC_SYS_COMPILER 4928 4929# save warnings/boilerplate of simple test code 4930_LT_COMPILER_BOILERPLATE 4931_LT_LINKER_BOILERPLATE 4932 4933# Allow CC to be a program name with arguments. 4934lt_save_CC="$CC" 4935CC=${RC-"windres"} 4936compiler=$CC 4937_LT_AC_TAGVAR(compiler, $1)=$CC 4938_LT_CC_BASENAME([$compiler]) 4939_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4940 4941AC_LIBTOOL_CONFIG($1) 4942 4943AC_LANG_RESTORE 4944CC="$lt_save_CC" 4945])# AC_LIBTOOL_LANG_RC_CONFIG 4946 4947 4948# AC_LIBTOOL_CONFIG([TAGNAME]) 4949# ---------------------------- 4950# If TAGNAME is not passed, then create an initial libtool script 4951# with a default configuration from the untagged config vars. Otherwise 4952# add code to config.status for appending the configuration named by 4953# TAGNAME from the matching tagged config vars. 4954AC_DEFUN([AC_LIBTOOL_CONFIG], 4955[# The else clause should only fire when bootstrapping the 4956# libtool distribution, otherwise you forgot to ship ltmain.sh 4957# with your package, and you will get complaints that there are 4958# no rules to generate ltmain.sh. 4959if test -f "$ltmain"; then 4960 # See if we are running on zsh, and set the options which allow our commands through 4961 # without removal of \ escapes. 4962 if test -n "${ZSH_VERSION+set}" ; then 4963 setopt NO_GLOB_SUBST 4964 fi 4965 # Now quote all the things that may contain metacharacters while being 4966 # careful not to overquote the AC_SUBSTed values. We take copies of the 4967 # variables and quote the copies for generation of the libtool script. 4968 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ 4969 SED SHELL STRIP \ 4970 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 4971 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 4972 deplibs_check_method reload_flag reload_cmds need_locks \ 4973 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 4974 lt_cv_sys_global_symbol_to_c_name_address \ 4975 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 4976 old_postinstall_cmds old_postuninstall_cmds \ 4977 _LT_AC_TAGVAR(compiler, $1) \ 4978 _LT_AC_TAGVAR(CC, $1) \ 4979 _LT_AC_TAGVAR(LD, $1) \ 4980 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 4981 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 4982 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 4983 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 4984 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 4985 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 4986 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 4987 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 4988 _LT_AC_TAGVAR(old_archive_cmds, $1) \ 4989 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 4990 _LT_AC_TAGVAR(predep_objects, $1) \ 4991 _LT_AC_TAGVAR(postdep_objects, $1) \ 4992 _LT_AC_TAGVAR(predeps, $1) \ 4993 _LT_AC_TAGVAR(postdeps, $1) \ 4994 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 4995 _LT_AC_TAGVAR(archive_cmds, $1) \ 4996 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 4997 _LT_AC_TAGVAR(postinstall_cmds, $1) \ 4998 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 4999 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 5000 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 5001 _LT_AC_TAGVAR(no_undefined_flag, $1) \ 5002 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 5003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 5004 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 5005 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 5006 _LT_AC_TAGVAR(hardcode_automatic, $1) \ 5007 _LT_AC_TAGVAR(module_cmds, $1) \ 5008 _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 5009 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 5010 _LT_AC_TAGVAR(exclude_expsyms, $1) \ 5011 _LT_AC_TAGVAR(include_expsyms, $1); do 5012 5013 case $var in 5014 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 5015 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 5016 _LT_AC_TAGVAR(archive_cmds, $1) | \ 5017 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 5018 _LT_AC_TAGVAR(module_cmds, $1) | \ 5019 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 5020 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 5021 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 5022 extract_expsyms_cmds | reload_cmds | finish_cmds | \ 5023 postinstall_cmds | postuninstall_cmds | \ 5024 old_postinstall_cmds | old_postuninstall_cmds | \ 5025 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 5026 # Double-quote double-evaled strings. 5027 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 5028 ;; 5029 *) 5030 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 5031 ;; 5032 esac 5033 done 5034 5035 case $lt_echo in 5036 *'\[$]0 --fallback-echo"') 5037 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 5038 ;; 5039 esac 5040 5041ifelse([$1], [], 5042 [cfgfile="${ofile}T" 5043 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 5044 $rm -f "$cfgfile" 5045 AC_MSG_NOTICE([creating $ofile])], 5046 [cfgfile="$ofile"]) 5047 5048 cat <<__EOF__ >> "$cfgfile" 5049ifelse([$1], [], 5050[#! $SHELL 5051 5052# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 5053# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 5054# NOTE: Changes made to this file will be lost: look at ltmain.sh. 5055# 5056# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 5057# Free Software Foundation, Inc. 5058# 5059# This file is part of GNU Libtool: 5060# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5061# 5062# This program is free software; you can redistribute it and/or modify 5063# it under the terms of the GNU General Public License as published by 5064# the Free Software Foundation; either version 2 of the License, or 5065# (at your option) any later version. 5066# 5067# This program is distributed in the hope that it will be useful, but 5068# WITHOUT ANY WARRANTY; without even the implied warranty of 5069# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5070# General Public License for more details. 5071# 5072# You should have received a copy of the GNU General Public License 5073# along with this program; if not, write to the Free Software 5074# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 5075# 5076# As a special exception to the GNU General Public License, if you 5077# distribute this file as part of a program that contains a 5078# configuration script generated by Autoconf, you may include it under 5079# the same distribution terms that you use for the rest of that program. 5080 5081# A sed program that does not truncate output. 5082SED=$lt_SED 5083 5084# Sed that helps us avoid accidentally triggering echo(1) options like -n. 5085Xsed="$SED -e 1s/^X//" 5086 5087# The HP-UX ksh and POSIX shell print the target directory to stdout 5088# if CDPATH is set. 5089(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5090 5091# The names of the tagged configurations supported by this script. 5092available_tags= 5093 5094# ### BEGIN LIBTOOL CONFIG], 5095[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 5096 5097# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 5098 5099# Shell to use when invoking shell scripts. 5100SHELL=$lt_SHELL 5101 5102# Whether or not to build shared libraries. 5103build_libtool_libs=$enable_shared 5104 5105# Whether or not to build static libraries. 5106build_old_libs=$enable_static 5107 5108# Whether or not to add -lc for building shared libraries. 5109build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 5110 5111# Whether or not to disallow shared libs when runtime libs are static 5112allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 5113 5114# Whether or not to optimize for fast installation. 5115fast_install=$enable_fast_install 5116 5117# The host system. 5118host_alias=$host_alias 5119host=$host 5120host_os=$host_os 5121 5122# The build system. 5123build_alias=$build_alias 5124build=$build 5125build_os=$build_os 5126 5127# An echo program that does not interpret backslashes. 5128echo=$lt_echo 5129 5130# The archiver. 5131AR=$lt_AR 5132AR_FLAGS=$lt_AR_FLAGS 5133 5134# A C compiler. 5135LTCC=$lt_LTCC 5136 5137# A language-specific compiler. 5138CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 5139 5140# Is the compiler the GNU C compiler? 5141with_gcc=$_LT_AC_TAGVAR(GCC, $1) 5142 5143# An ERE matcher. 5144EGREP=$lt_EGREP 5145 5146# The linker used to build libraries. 5147LD=$lt_[]_LT_AC_TAGVAR(LD, $1) 5148 5149# Whether we need hard or soft links. 5150LN_S=$lt_LN_S 5151 5152# A BSD-compatible nm program. 5153NM=$lt_NM 5154 5155# A symbol stripping program 5156STRIP=$lt_STRIP 5157 5158# Used to examine libraries when file_magic_cmd begins "file" 5159MAGIC_CMD=$MAGIC_CMD 5160 5161# Used on cygwin: DLL creation program. 5162DLLTOOL="$DLLTOOL" 5163 5164# Used on cygwin: object dumper. 5165OBJDUMP="$OBJDUMP" 5166 5167# Used on cygwin: assembler. 5168AS="$AS" 5169 5170# The name of the directory that contains temporary libtool files. 5171objdir=$objdir 5172 5173# How to create reloadable object files. 5174reload_flag=$lt_reload_flag 5175reload_cmds=$lt_reload_cmds 5176 5177# How to pass a linker flag through the compiler. 5178wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 5179 5180# Object file suffix (normally "o"). 5181objext="$ac_objext" 5182 5183# Old archive suffix (normally "a"). 5184libext="$libext" 5185 5186# Shared library suffix (normally ".so"). 5187shrext_cmds='$shrext_cmds' 5188 5189# Executable file suffix (normally ""). 5190exeext="$exeext" 5191 5192# Additional compiler flags for building library objects. 5193pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 5194pic_mode=$pic_mode 5195 5196# What is the maximum length of a command? 5197max_cmd_len=$lt_cv_sys_max_cmd_len 5198 5199# Does compiler simultaneously support -c and -o options? 5200compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 5201 5202# Must we lock files when doing compilation? 5203need_locks=$lt_need_locks 5204 5205# Do we need the lib prefix for modules? 5206need_lib_prefix=$need_lib_prefix 5207 5208# Do we need a version for libraries? 5209need_version=$need_version 5210 5211# Whether dlopen is supported. 5212dlopen_support=$enable_dlopen 5213 5214# Whether dlopen of programs is supported. 5215dlopen_self=$enable_dlopen_self 5216 5217# Whether dlopen of statically linked programs is supported. 5218dlopen_self_static=$enable_dlopen_self_static 5219 5220# Compiler flag to prevent dynamic linking. 5221link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 5222 5223# Compiler flag to turn off builtin functions. 5224no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 5225 5226# Compiler flag to allow reflexive dlopens. 5227export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 5228 5229# Compiler flag to generate shared objects directly from archives. 5230whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 5231 5232# Compiler flag to generate thread-safe objects. 5233thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 5234 5235# Library versioning type. 5236version_type=$version_type 5237 5238# Format of library name prefix. 5239libname_spec=$lt_libname_spec 5240 5241# List of archive names. First name is the real one, the rest are links. 5242# The last name is the one that the linker finds with -lNAME. 5243library_names_spec=$lt_library_names_spec 5244 5245# The coded name of the library, if different from the real name. 5246soname_spec=$lt_soname_spec 5247 5248# Commands used to build and install an old-style archive. 5249RANLIB=$lt_RANLIB 5250old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 5251old_postinstall_cmds=$lt_old_postinstall_cmds 5252old_postuninstall_cmds=$lt_old_postuninstall_cmds 5253 5254# Create an old-style archive from a shared archive. 5255old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 5256 5257# Create a temporary old-style archive to link instead of a shared archive. 5258old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 5259 5260# Commands used to build and install a shared archive. 5261archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 5262archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 5263postinstall_cmds=$lt_postinstall_cmds 5264postuninstall_cmds=$lt_postuninstall_cmds 5265 5266# Commands used to build a loadable module (assumed same as above if empty) 5267module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 5268module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 5269 5270# Commands to strip libraries. 5271old_striplib=$lt_old_striplib 5272striplib=$lt_striplib 5273 5274# Dependencies to place before the objects being linked to create a 5275# shared library. 5276predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 5277 5278# Dependencies to place after the objects being linked to create a 5279# shared library. 5280postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 5281 5282# Dependencies to place before the objects being linked to create a 5283# shared library. 5284predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 5285 5286# Dependencies to place after the objects being linked to create a 5287# shared library. 5288postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 5289 5290# The library search path used internally by the compiler when linking 5291# a shared library. 5292compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 5293 5294# Method to check whether dependent libraries are shared objects. 5295deplibs_check_method=$lt_deplibs_check_method 5296 5297# Command to use when deplibs_check_method == file_magic. 5298file_magic_cmd=$lt_file_magic_cmd 5299 5300# Flag that allows shared libraries with undefined symbols to be built. 5301allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 5302 5303# Flag that forces no undefined symbols. 5304no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 5305 5306# Commands used to finish a libtool library installation in a directory. 5307finish_cmds=$lt_finish_cmds 5308 5309# Same as above, but a single script fragment to be evaled but not shown. 5310finish_eval=$lt_finish_eval 5311 5312# Take the output of nm and produce a listing of raw symbols and C names. 5313global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 5314 5315# Transform the output of nm in a proper C declaration 5316global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 5317 5318# Transform the output of nm in a C name address pair 5319global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 5320 5321# This is the shared library runtime path variable. 5322runpath_var=$runpath_var 5323 5324# This is the shared library path variable. 5325shlibpath_var=$shlibpath_var 5326 5327# Is shlibpath searched before the hard-coded library search path? 5328shlibpath_overrides_runpath=$shlibpath_overrides_runpath 5329 5330# How to hardcode a shared library path into an executable. 5331hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 5332 5333# Whether we should hardcode library paths into libraries. 5334hardcode_into_libs=$hardcode_into_libs 5335 5336# Flag to hardcode \$libdir into a binary during linking. 5337# This must work even if \$libdir does not exist. 5338hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 5339 5340# If ld is used when linking, flag to hardcode \$libdir into 5341# a binary during linking. This must work even if \$libdir does 5342# not exist. 5343hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 5344 5345# Whether we need a single -rpath flag with a separated argument. 5346hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 5347 5348# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 5349# resulting binary. 5350hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 5351 5352# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 5353# resulting binary. 5354hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 5355 5356# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 5357# the resulting binary. 5358hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 5359 5360# Set to yes if building a shared library automatically hardcodes DIR into the library 5361# and all subsequent libraries and executables linked against it. 5362hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 5363 5364# Variables whose values should be saved in libtool wrapper scripts and 5365# restored at relink time. 5366variables_saved_for_relink="$variables_saved_for_relink" 5367 5368# Whether libtool must link a program against all its dependency libraries. 5369link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 5370 5371# Compile-time system search path for libraries 5372sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 5373 5374# Run-time system search path for libraries 5375sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 5376 5377# Fix the shell variable \$srcfile for the compiler. 5378fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 5379 5380# Set to yes if exported symbols are required. 5381always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 5382 5383# The commands to list exported symbols. 5384export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 5385 5386# The commands to extract the exported symbol list from a shared archive. 5387extract_expsyms_cmds=$lt_extract_expsyms_cmds 5388 5389# Symbols that should not be listed in the preloaded symbols. 5390exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 5391 5392# Symbols that must always be exported. 5393include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 5394 5395ifelse([$1],[], 5396[# ### END LIBTOOL CONFIG], 5397[# ### END LIBTOOL TAG CONFIG: $tagname]) 5398 5399__EOF__ 5400 5401ifelse([$1],[], [ 5402 case $host_os in 5403 aix3*) 5404 cat <<\EOF >> "$cfgfile" 5405 5406# AIX sometimes has problems with the GCC collect2 program. For some 5407# reason, if we set the COLLECT_NAMES environment variable, the problems 5408# vanish in a puff of smoke. 5409if test "X${COLLECT_NAMES+set}" != Xset; then 5410 COLLECT_NAMES= 5411 export COLLECT_NAMES 5412fi 5413EOF 5414 ;; 5415 esac 5416 5417 # We use sed instead of cat because bash on DJGPP gets confused if 5418 # if finds mixed CR/LF and LF-only lines. Since sed operates in 5419 # text mode, it properly converts lines to CR/LF. This bash problem 5420 # is reportedly fixed, but why not run on old versions too? 5421 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 5422 5423 mv -f "$cfgfile" "$ofile" || \ 5424 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 5425 chmod +x "$ofile" 5426]) 5427else 5428 # If there is no Makefile yet, we rely on a make rule to execute 5429 # `config.status --recheck' to rerun these tests and create the 5430 # libtool script then. 5431 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 5432 if test -f "$ltmain_in"; then 5433 test -f Makefile && make "$ltmain" 5434 fi 5435fi 5436])# AC_LIBTOOL_CONFIG 5437 5438 5439# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 5440# ------------------------------------------- 5441AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 5442[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 5443 5444_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5445 5446if test "$GCC" = yes; then 5447 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5448 5449 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5450 lt_cv_prog_compiler_rtti_exceptions, 5451 [-fno-rtti -fno-exceptions], [], 5452 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 5453fi 5454])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 5455 5456 5457# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5458# --------------------------------- 5459AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 5460[AC_REQUIRE([AC_CANONICAL_HOST]) 5461AC_REQUIRE([AC_PROG_NM]) 5462AC_REQUIRE([AC_OBJEXT]) 5463# Check for command to grab the raw symbol name followed by C symbol from nm. 5464AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5465AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5466[ 5467# These are sane defaults that work on at least a few old systems. 5468# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5469 5470# Character class describing NM global symbol codes. 5471symcode='[[BCDEGRST]]' 5472 5473# Regexp to match symbols that can be accessed directly from C. 5474sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5475 5476# Transform an extracted symbol line into a proper C declaration 5477lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 5478 5479# Transform an extracted symbol line into symbol name and symbol address 5480lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 5481 5482# Define system-specific variables. 5483case $host_os in 5484aix*) 5485 symcode='[[BCDT]]' 5486 ;; 5487cygwin* | mingw* | pw32*) 5488 symcode='[[ABCDGISTW]]' 5489 ;; 5490hpux*) # Its linker distinguishes data from code symbols 5491 if test "$host_cpu" = ia64; then 5492 symcode='[[ABCDEGRST]]' 5493 fi 5494 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5495 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 5496 ;; 5497linux*) 5498 if test "$host_cpu" = ia64; then 5499 symcode='[[ABCDGIRSTW]]' 5500 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5501 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 5502 fi 5503 ;; 5504irix* | nonstopux*) 5505 symcode='[[BCDEGRST]]' 5506 ;; 5507osf*) 5508 symcode='[[BCDEGQRST]]' 5509 ;; 5510solaris* | sysv5*) 5511 symcode='[[BDRT]]' 5512 ;; 5513sysv4) 5514 symcode='[[DFNSTU]]' 5515 ;; 5516esac 5517 5518# Handle CRLF in mingw tool chain 5519opt_cr= 5520case $build_os in 5521mingw*) 5522 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5523 ;; 5524esac 5525 5526# If we're using GNU nm, then use its standard symbol codes. 5527case `$NM -V 2>&1` in 5528*GNU* | *'with BFD'*) 5529 symcode='[[ABCDGIRSTW]]' ;; 5530esac 5531 5532# Try without a prefix undercore, then with it. 5533for ac_symprfx in "" "_"; do 5534 5535 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5536 symxfrm="\\1 $ac_symprfx\\2 \\2" 5537 5538 # Write the raw and C identifiers. 5539 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5540 5541 # Check to see that the pipe works correctly. 5542 pipe_works=no 5543 5544 rm -f conftest* 5545 cat > conftest.$ac_ext <<EOF 5546#ifdef __cplusplus 5547extern "C" { 5548#endif 5549char nm_test_var; 5550void nm_test_func(){} 5551#ifdef __cplusplus 5552} 5553#endif 5554int main(){nm_test_var='a';nm_test_func();return(0);} 5555EOF 5556 5557 if AC_TRY_EVAL(ac_compile); then 5558 # Now try to grab the symbols. 5559 nlist=conftest.nm 5560 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 5561 # Try sorting and uniquifying the output. 5562 if sort "$nlist" | uniq > "$nlist"T; then 5563 mv -f "$nlist"T "$nlist" 5564 else 5565 rm -f "$nlist"T 5566 fi 5567 5568 # Make sure that we snagged all the symbols we need. 5569 if grep ' nm_test_var$' "$nlist" >/dev/null; then 5570 if grep ' nm_test_func$' "$nlist" >/dev/null; then 5571 cat <<EOF > conftest.$ac_ext 5572#ifdef __cplusplus 5573extern "C" { 5574#endif 5575 5576EOF 5577 # Now generate the symbol file. 5578 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 5579 5580 cat <<EOF >> conftest.$ac_ext 5581#if defined (__STDC__) && __STDC__ 5582# define lt_ptr_t void * 5583#else 5584# define lt_ptr_t char * 5585# define const 5586#endif 5587 5588/* The mapping between symbol names and symbols. */ 5589const struct { 5590 const char *name; 5591 lt_ptr_t address; 5592} 5593lt_preloaded_symbols[[]] = 5594{ 5595EOF 5596 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 5597 cat <<\EOF >> conftest.$ac_ext 5598 {0, (lt_ptr_t) 0} 5599}; 5600 5601#ifdef __cplusplus 5602} 5603#endif 5604EOF 5605 # Now try linking the two files. 5606 mv conftest.$ac_objext conftstm.$ac_objext 5607 lt_save_LIBS="$LIBS" 5608 lt_save_CFLAGS="$CFLAGS" 5609 LIBS="conftstm.$ac_objext" 5610 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 5611 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 5612 pipe_works=yes 5613 fi 5614 LIBS="$lt_save_LIBS" 5615 CFLAGS="$lt_save_CFLAGS" 5616 else 5617 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5618 fi 5619 else 5620 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 5621 fi 5622 else 5623 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 5624 fi 5625 else 5626 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 5627 cat conftest.$ac_ext >&5 5628 fi 5629 rm -f conftest* conftst* 5630 5631 # Do not use the global_symbol_pipe unless it works. 5632 if test "$pipe_works" = yes; then 5633 break 5634 else 5635 lt_cv_sys_global_symbol_pipe= 5636 fi 5637done 5638]) 5639if test -z "$lt_cv_sys_global_symbol_pipe"; then 5640 lt_cv_sys_global_symbol_to_cdecl= 5641fi 5642if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 5643 AC_MSG_RESULT(failed) 5644else 5645 AC_MSG_RESULT(ok) 5646fi 5647]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5648 5649 5650# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 5651# --------------------------------------- 5652AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 5653[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 5654_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5655_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 5656 5657AC_MSG_CHECKING([for $compiler option to produce PIC]) 5658 ifelse([$1],[CXX],[ 5659 # C++ specific cases for pic, static, wl, etc. 5660 if test "$GXX" = yes; then 5661 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5662 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5663 5664 case $host_os in 5665 aix*) 5666 # All AIX code is PIC. 5667 if test "$host_cpu" = ia64; then 5668 # AIX 5 now supports IA64 processor 5669 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5670 fi 5671 ;; 5672 amigaos*) 5673 # FIXME: we need at least 68020 code to build shared libraries, but 5674 # adding the `-m68020' flag to GCC prevents building anything better, 5675 # like `-m68040'. 5676 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5677 ;; 5678 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5679 # PIC is the default for these OSes. 5680 ;; 5681 mingw* | os2* | pw32*) 5682 # This hack is so that the source file can tell whether it is being 5683 # built for inclusion in a dll (and should export symbols for example). 5684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5685 ;; 5686 darwin* | rhapsody*) 5687 # PIC is the default on this platform 5688 # Common symbols not allowed in MH_DYLIB files 5689 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5690 ;; 5691 *djgpp*) 5692 # DJGPP does not support shared libraries at all 5693 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5694 ;; 5695 sysv4*MP*) 5696 if test -d /usr/nec; then 5697 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5698 fi 5699 ;; 5700 hpux*) 5701 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5702 # not for PA HP-UX. 5703 case "$host_cpu" in 5704 hppa*64*|ia64*) 5705 ;; 5706 *) 5707 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5708 ;; 5709 esac 5710 ;; 5711 *) 5712 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5713 ;; 5714 esac 5715 else 5716 case $host_os in 5717 aix4* | aix5*) 5718 # All AIX code is PIC. 5719 if test "$host_cpu" = ia64; then 5720 # AIX 5 now supports IA64 processor 5721 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5722 else 5723 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5724 fi 5725 ;; 5726 chorus*) 5727 case $cc_basename in 5728 cxch68*) 5729 # Green Hills C++ Compiler 5730 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 5731 ;; 5732 esac 5733 ;; 5734 darwin*) 5735 # PIC is the default on this platform 5736 # Common symbols not allowed in MH_DYLIB files 5737 case $cc_basename in 5738 xlc*) 5739 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 5740 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5741 ;; 5742 esac 5743 ;; 5744 dgux*) 5745 case $cc_basename in 5746 ec++*) 5747 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5748 ;; 5749 ghcx*) 5750 # Green Hills C++ Compiler 5751 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5752 ;; 5753 *) 5754 ;; 5755 esac 5756 ;; 5757 freebsd* | kfreebsd*-gnu | dragonfly*) 5758 # FreeBSD uses GNU C++ 5759 ;; 5760 hpux9* | hpux10* | hpux11*) 5761 case $cc_basename in 5762 CC*) 5763 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5764 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 5765 if test "$host_cpu" != ia64; then 5766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5767 fi 5768 ;; 5769 aCC*) 5770 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5771 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 5772 case "$host_cpu" in 5773 hppa*64*|ia64*) 5774 # +Z the default 5775 ;; 5776 *) 5777 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5778 ;; 5779 esac 5780 ;; 5781 *) 5782 ;; 5783 esac 5784 ;; 5785 irix5* | irix6* | nonstopux*) 5786 case $cc_basename in 5787 CC*) 5788 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5789 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5790 # CC pic flag -KPIC is the default. 5791 ;; 5792 *) 5793 ;; 5794 esac 5795 ;; 5796 linux*) 5797 case $cc_basename in 5798 KCC*) 5799 # KAI C++ Compiler 5800 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5801 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5802 ;; 5803 icpc* | ecpc*) 5804 # Intel C++ 5805 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5806 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5807 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5808 ;; 5809 pgCC*) 5810 # Portland Group C++ compiler. 5811 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5812 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5813 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5814 ;; 5815 cxx*) 5816 # Compaq C++ 5817 # Make sure the PIC flag is empty. It appears that all Alpha 5818 # Linux and Compaq Tru64 Unix objects are PIC. 5819 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5820 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5821 ;; 5822 *) 5823 ;; 5824 esac 5825 ;; 5826 lynxos*) 5827 ;; 5828 m88k*) 5829 ;; 5830 mvs*) 5831 case $cc_basename in 5832 cxx*) 5833 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5834 ;; 5835 *) 5836 ;; 5837 esac 5838 ;; 5839 netbsd*) 5840 ;; 5841 osf3* | osf4* | osf5*) 5842 case $cc_basename in 5843 KCC*) 5844 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5845 ;; 5846 RCC*) 5847 # Rational C++ 2.4.1 5848 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5849 ;; 5850 cxx*) 5851 # Digital/Compaq C++ 5852 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5853 # Make sure the PIC flag is empty. It appears that all Alpha 5854 # Linux and Compaq Tru64 Unix objects are PIC. 5855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 5856 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5857 ;; 5858 *) 5859 ;; 5860 esac 5861 ;; 5862 psos*) 5863 ;; 5864 sco*) 5865 case $cc_basename in 5866 CC*) 5867 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5868 ;; 5869 *) 5870 ;; 5871 esac 5872 ;; 5873 solaris*) 5874 case $cc_basename in 5875 CC*) 5876 # Sun C++ 4.2, 5.x and Centerline C++ 5877 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5878 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5879 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5880 ;; 5881 gcx*) 5882 # Green Hills C++ Compiler 5883 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5884 ;; 5885 *) 5886 ;; 5887 esac 5888 ;; 5889 sunos4*) 5890 case $cc_basename in 5891 CC*) 5892 # Sun C++ 4.x 5893 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5894 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5895 ;; 5896 lcc*) 5897 # Lucid 5898 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5899 ;; 5900 *) 5901 ;; 5902 esac 5903 ;; 5904 tandem*) 5905 case $cc_basename in 5906 NCC*) 5907 # NonStop-UX NCC 3.20 5908 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5909 ;; 5910 *) 5911 ;; 5912 esac 5913 ;; 5914 unixware*) 5915 ;; 5916 vxworks*) 5917 ;; 5918 *) 5919 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5920 ;; 5921 esac 5922 fi 5923], 5924[ 5925 if test "$GCC" = yes; then 5926 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5927 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 5928 5929 case $host_os in 5930 aix*) 5931 # All AIX code is PIC. 5932 if test "$host_cpu" = ia64; then 5933 # AIX 5 now supports IA64 processor 5934 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5935 fi 5936 ;; 5937 5938 amigaos*) 5939 # FIXME: we need at least 68020 code to build shared libraries, but 5940 # adding the `-m68020' flag to GCC prevents building anything better, 5941 # like `-m68040'. 5942 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5943 ;; 5944 5945 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5946 # PIC is the default for these OSes. 5947 ;; 5948 5949 mingw* | pw32* | os2*) 5950 # This hack is so that the source file can tell whether it is being 5951 # built for inclusion in a dll (and should export symbols for example). 5952 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 5953 ;; 5954 5955 darwin* | rhapsody*) 5956 # PIC is the default on this platform 5957 # Common symbols not allowed in MH_DYLIB files 5958 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5959 ;; 5960 5961 msdosdjgpp*) 5962 # Just because we use GCC doesn't mean we suddenly get shared libraries 5963 # on systems that don't support them. 5964 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5965 enable_shared=no 5966 ;; 5967 5968 sysv4*MP*) 5969 if test -d /usr/nec; then 5970 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5971 fi 5972 ;; 5973 5974 hpux*) 5975 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5976 # not for PA HP-UX. 5977 case "$host_cpu" in 5978 hppa*64*|ia64*) 5979 # +Z the default 5980 ;; 5981 *) 5982 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5983 ;; 5984 esac 5985 ;; 5986 5987 *) 5988 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5989 ;; 5990 esac 5991 else 5992 # PORTME Check for flag to pass linker flags through the system compiler. 5993 case $host_os in 5994 aix*) 5995 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5996 if test "$host_cpu" = ia64; then 5997 # AIX 5 now supports IA64 processor 5998 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5999 else 6000 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6001 fi 6002 ;; 6003 darwin*) 6004 # PIC is the default on this platform 6005 # Common symbols not allowed in MH_DYLIB files 6006 case $cc_basename in 6007 xlc*) 6008 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 6009 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6010 ;; 6011 esac 6012 ;; 6013 6014 mingw* | pw32* | os2*) 6015 # This hack is so that the source file can tell whether it is being 6016 # built for inclusion in a dll (and should export symbols for example). 6017 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6018 ;; 6019 6020 hpux9* | hpux10* | hpux11*) 6021 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6022 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6023 # not for PA HP-UX. 6024 case "$host_cpu" in 6025 hppa*64*|ia64*) 6026 # +Z the default 6027 ;; 6028 *) 6029 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6030 ;; 6031 esac 6032 # Is there a better lt_prog_compiler_static that works with the bundled CC? 6033 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6034 ;; 6035 6036 irix5* | irix6* | nonstopux*) 6037 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6038 # PIC (with -KPIC) is the default. 6039 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6040 ;; 6041 6042 newsos6) 6043 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6044 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6045 ;; 6046 6047 linux*) 6048 case $cc_basename in 6049 icc* | ecc*) 6050 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6051 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6052 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6053 ;; 6054 pgcc* | pgf77* | pgf90*) 6055 # Portland Group compilers (*not* the Pentium gcc compiler, 6056 # which looks to be a dead project) 6057 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6059 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6060 ;; 6061 ccc*) 6062 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6063 # All Alpha code is PIC. 6064 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6065 ;; 6066 esac 6067 ;; 6068 6069 osf3* | osf4* | osf5*) 6070 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6071 # All OSF/1 code is PIC. 6072 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6073 ;; 6074 6075 sco3.2v5*) 6076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' 6077 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' 6078 ;; 6079 6080 solaris*) 6081 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6082 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6083 case $cc_basename in 6084 f77* | f90* | f95*) 6085 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6086 *) 6087 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6088 esac 6089 ;; 6090 6091 sunos4*) 6092 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6093 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6094 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6095 ;; 6096 6097 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6098 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6100 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6101 ;; 6102 6103 sysv4*MP*) 6104 if test -d /usr/nec ;then 6105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6106 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6107 fi 6108 ;; 6109 6110 unicos*) 6111 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6112 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6113 ;; 6114 6115 uts4*) 6116 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6117 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6118 ;; 6119 6120 *) 6121 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6122 ;; 6123 esac 6124 fi 6125]) 6126AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 6127 6128# 6129# Check to make sure the PIC flag actually works. 6130# 6131if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 6132 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 6133 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 6134 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 6135 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 6136 "" | " "*) ;; 6137 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6138 esac], 6139 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6140 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 6141fi 6142case "$host_os" in 6143 # For platforms which do not support PIC, -DPIC is meaningless: 6144 *djgpp*) 6145 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6146 ;; 6147 *) 6148 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 6149 ;; 6150esac 6151]) 6152 6153 6154# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 6155# ------------------------------------ 6156# See if the linker supports building shared libraries. 6157AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 6158[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6159ifelse([$1],[CXX],[ 6160 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6161 case $host_os in 6162 aix4* | aix5*) 6163 # If we're using GNU nm, then we don't want the "-C" option. 6164 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6165 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6166 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 6167 else 6168 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 6169 fi 6170 ;; 6171 pw32*) 6172 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 6173 ;; 6174 cygwin* | mingw*) 6175 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 6176 ;; 6177 *) 6178 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6179 ;; 6180 esac 6181],[ 6182 runpath_var= 6183 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 6184 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6185 _LT_AC_TAGVAR(archive_cmds, $1)= 6186 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6187 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 6188 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6189 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6190 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6191 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 6192 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6193 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6194 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6195 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6196 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6197 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6198 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6199 _LT_AC_TAGVAR(hardcode_automatic, $1)=no 6200 _LT_AC_TAGVAR(module_cmds, $1)= 6201 _LT_AC_TAGVAR(module_expsym_cmds, $1)= 6202 _LT_AC_TAGVAR(always_export_symbols, $1)=no 6203 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6204 # include_expsyms should be a list of space-separated symbols to be *always* 6205 # included in the symbol list 6206 _LT_AC_TAGVAR(include_expsyms, $1)= 6207 # exclude_expsyms can be an extended regexp of symbols to exclude 6208 # it will be wrapped by ` (' and `)$', so one must not match beginning or 6209 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6210 # as well as any symbol that contains `d'. 6211 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 6212 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6213 # platforms (ab)use it in PIC code, but their linkers get confused if 6214 # the symbol is explicitly referenced. Since portable code cannot 6215 # rely on this symbol name, it's probably fine to never include it in 6216 # preloaded symbol tables. 6217 extract_expsyms_cmds= 6218 # Just being paranoid about ensuring that cc_basename is set. 6219 _LT_CC_BASENAME([$compiler]) 6220 case $host_os in 6221 cygwin* | mingw* | pw32*) 6222 # FIXME: the MSVC++ port hasn't been tested in a loooong time 6223 # When not using gcc, we currently assume that we are using 6224 # Microsoft Visual C++. 6225 if test "$GCC" != yes; then 6226 with_gnu_ld=no 6227 fi 6228 ;; 6229 openbsd*) 6230 with_gnu_ld=no 6231 ;; 6232 esac 6233 6234 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6235 if test "$with_gnu_ld" = yes; then 6236 # If archive_cmds runs LD, not CC, wlarc should be empty 6237 wlarc='${wl}' 6238 6239 # Set some defaults for GNU ld with shared library support. These 6240 # are reset later if shared libraries are not supported. Putting them 6241 # here allows them to be overridden if necessary. 6242 runpath_var=LD_RUN_PATH 6243 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6244 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6245 # ancient GNU ld didn't support --whole-archive et. al. 6246 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 6247 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6248 else 6249 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6250 fi 6251 supports_anon_versioning=no 6252 case `$LD -v 2>/dev/null` in 6253 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6254 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6255 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6256 *\ 2.11.*) ;; # other 2.11 versions 6257 *) supports_anon_versioning=yes ;; 6258 esac 6259 6260 # See if GNU ld supports shared libraries. 6261 case $host_os in 6262 aix3* | aix4* | aix5*) 6263 # On AIX/PPC, the GNU linker is very broken 6264 if test "$host_cpu" != ia64; then 6265 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6266 cat <<EOF 1>&2 6267 6268*** Warning: the GNU linker, at least up to release 2.9.1, is reported 6269*** to be unable to reliably create shared libraries on AIX. 6270*** Therefore, libtool is disabling shared libraries support. If you 6271*** really care for shared libraries, you may want to modify your PATH 6272*** so that a non-GNU linker is found, and then restart. 6273 6274EOF 6275 fi 6276 ;; 6277 6278 amigaos*) 6279 _LT_AC_TAGVAR(archive_cmds, $1)='$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)' 6280 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6281 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6282 6283 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 6284 # that the semantics of dynamic libraries on AmigaOS, at least up 6285 # to version 4, is to share data among multiple programs linked 6286 # with the same dynamic library. Since this doesn't match the 6287 # behavior of shared libraries on other platforms, we can't use 6288 # them. 6289 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6290 ;; 6291 6292 beos*) 6293 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6294 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6295 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6296 # support --undefined. This deserves some investigation. FIXME 6297 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6298 else 6299 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6300 fi 6301 ;; 6302 6303 cygwin* | mingw* | pw32*) 6304 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6305 # as there is no search path for DLLs. 6306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6307 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6308 _LT_AC_TAGVAR(always_export_symbols, $1)=no 6309 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6310 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' 6311 6312 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 6313 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 6314 # If the export-symbols file already is a .def file (1st line 6315 # is EXPORTS), use it as is; otherwise, prepend... 6316 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6317 cp $export_symbols $output_objdir/$soname.def; 6318 else 6319 echo EXPORTS > $output_objdir/$soname.def; 6320 cat $export_symbols >> $output_objdir/$soname.def; 6321 fi~ 6322 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' 6323 else 6324 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6325 fi 6326 ;; 6327 6328 linux*) 6329 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6330 tmp_addflag= 6331 case $cc_basename,$host_cpu in 6332 pgcc*) # Portland Group C compiler 6333 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6334 ;; 6335 pgf77* | pgf90* ) # Portland Group f77 and f90 compilers 6336 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6337 tmp_addflag=' -fpic -Mnomain' ;; 6338 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6339 tmp_addflag=' -i_dynamic' ;; 6340 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6341 tmp_addflag=' -i_dynamic -nofor_main' ;; 6342 ifc* | ifort*) # Intel Fortran compiler 6343 tmp_addflag=' -nofor_main' ;; 6344 esac 6345 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6346 6347 if test $supports_anon_versioning = yes; then 6348 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 6349 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6350 $echo "local: *; };" >> $output_objdir/$libname.ver~ 6351 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6352 fi 6353 else 6354 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6355 fi 6356 ;; 6357 6358 netbsd*) 6359 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6360 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 6361 wlarc= 6362 else 6363 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6365 fi 6366 ;; 6367 6368 solaris* | sysv5*) 6369 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 6370 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6371 cat <<EOF 1>&2 6372 6373*** Warning: The releases 2.8.* of the GNU linker cannot reliably 6374*** create shared libraries on Solaris systems. Therefore, libtool 6375*** is disabling shared libraries support. We urge you to upgrade GNU 6376*** binutils to release 2.9.1 or newer. Another option is to modify 6377*** your PATH or compiler configuration so that the native linker is 6378*** used, and then restart. 6379 6380EOF 6381 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6382 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6383 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6384 else 6385 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6386 fi 6387 ;; 6388 6389 sunos4*) 6390 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6391 wlarc= 6392 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6393 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6394 ;; 6395 6396 *) 6397 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 6398 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6399 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6400 else 6401 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6402 fi 6403 ;; 6404 esac 6405 6406 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 6407 runpath_var= 6408 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6409 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6410 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6411 fi 6412 else 6413 # PORTME fill in a description of your system's linker (not GNU ld) 6414 case $host_os in 6415 aix3*) 6416 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6417 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 6418 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 6419 # Note: this linker hardcodes the directories in LIBPATH if there 6420 # are no directories specified by -L. 6421 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6422 if test "$GCC" = yes && test -z "$link_static_flag"; then 6423 # Neither direct hardcoding nor static linking is supported with a 6424 # broken collect2. 6425 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 6426 fi 6427 ;; 6428 6429 aix4* | aix5*) 6430 if test "$host_cpu" = ia64; then 6431 # On IA64, the linker does run time linking by default, so we don't 6432 # have to do anything special. 6433 aix_use_runtimelinking=no 6434 exp_sym_flag='-Bexport' 6435 no_entry_flag="" 6436 else 6437 # If we're using GNU nm, then we don't want the "-C" option. 6438 # -C means demangle to AIX nm, but means don't demangle with GNU nm 6439 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 6440 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 6441 else 6442 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 6443 fi 6444 aix_use_runtimelinking=no 6445 6446 # Test if we are trying to use run time linking or normal 6447 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6448 # need to do runtime linking. 6449 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 6450 for ld_flag in $LDFLAGS; do 6451 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6452 aix_use_runtimelinking=yes 6453 break 6454 fi 6455 done 6456 esac 6457 6458 exp_sym_flag='-bexport' 6459 no_entry_flag='-bnoentry' 6460 fi 6461 6462 # When large executables or shared objects are built, AIX ld can 6463 # have problems creating the table of contents. If linking a library 6464 # or program results in "error TOC overflow" add -mminimal-toc to 6465 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6466 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6467 6468 _LT_AC_TAGVAR(archive_cmds, $1)='' 6469 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6470 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 6471 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6472 6473 if test "$GCC" = yes; then 6474 case $host_os in aix4.[[012]]|aix4.[[012]].*) 6475 # We only want to do this on AIX 4.2 and lower, the check 6476 # below for broken collect2 doesn't work under 4.3+ 6477 collect2name=`${CC} -print-prog-name=collect2` 6478 if test -f "$collect2name" && \ 6479 strings "$collect2name" | grep resolve_lib_name >/dev/null 6480 then 6481 # We have reworked collect2 6482 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6483 else 6484 # We have old collect2 6485 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 6486 # It fails to find uninstalled libraries when the uninstalled 6487 # path is not listed in the libpath. Setting hardcode_minus_L 6488 # to unsupported forces relinking 6489 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6490 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6491 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6492 fi 6493 esac 6494 shared_flag='-shared' 6495 if test "$aix_use_runtimelinking" = yes; then 6496 shared_flag="$shared_flag "'${wl}-G' 6497 fi 6498 else 6499 # not using gcc 6500 if test "$host_cpu" = ia64; then 6501 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6502 # chokes on -Wl,-G. The following line is correct: 6503 shared_flag='-G' 6504 else 6505 if test "$aix_use_runtimelinking" = yes; then 6506 shared_flag='${wl}-G' 6507 else 6508 shared_flag='${wl}-bM:SRE' 6509 fi 6510 fi 6511 fi 6512 6513 # It seems that -bexpall does not export symbols beginning with 6514 # underscore (_), so it is better to generate a list of symbols to export. 6515 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 6516 if test "$aix_use_runtimelinking" = yes; then 6517 # Warning - without using the other runtime loading flags (-brtl), 6518 # -berok will link without error, but may produce a broken library. 6519 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 6520 # Determine the default libpath from the value encoded in an empty executable. 6521 _LT_AC_SYS_LIBPATH_AIX 6522 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6523 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" 6524 else 6525 if test "$host_cpu" = ia64; then 6526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6527 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6528 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 6529 else 6530 # Determine the default libpath from the value encoded in an empty executable. 6531 _LT_AC_SYS_LIBPATH_AIX 6532 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6533 # Warning - without using the other run time loading flags, 6534 # -berok will link without error, but may produce a broken library. 6535 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6536 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6537 # -bexpall does not export symbols beginning with underscore (_) 6538 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 6539 # Exported symbols can be pulled into shared objects from archives 6540 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 6541 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6542 # This is similar to how AIX traditionally builds it's shared libraries. 6543 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6544 fi 6545 fi 6546 ;; 6547 6548 amigaos*) 6549 _LT_AC_TAGVAR(archive_cmds, $1)='$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)' 6550 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6551 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6552 # see comment about different semantics on the GNU ld section 6553 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6554 ;; 6555 6556 bsdi[[45]]*) 6557 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6558 ;; 6559 6560 cygwin* | mingw* | pw32*) 6561 # When not using gcc, we currently assume that we are using 6562 # Microsoft Visual C++. 6563 # hardcode_libdir_flag_spec is actually meaningless, as there is 6564 # no search path for DLLs. 6565 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6566 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6567 # Tell ltmain to make .lib files, not .a files. 6568 libext=lib 6569 # Tell ltmain to make .dll files, not .so files. 6570 shrext_cmds=".dll" 6571 # FIXME: Setting linknames here is a bad hack. 6572 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 6573 # The linker will automatically build a .lib file if we build a DLL. 6574 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 6575 # FIXME: Should let the user specify the lib program. 6576 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 6577 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 6578 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6579 ;; 6580 6581 darwin* | rhapsody*) 6582 case "$host_os" in 6583 rhapsody* | darwin1.[[012]]) 6584 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 6585 ;; 6586 *) # Darwin 1.3 on 6587 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 6588 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6589 else 6590 case ${MACOSX_DEPLOYMENT_TARGET} in 6591 10.[[012]]) 6592 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 6593 ;; 6594 10.*) 6595 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 6596 ;; 6597 esac 6598 fi 6599 ;; 6600 esac 6601 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6602 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6603 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 6604 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6605 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 6606 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6607 if test "$GCC" = yes ; then 6608 output_verbose_link_cmd='echo' 6609 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 6610 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6611 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 6612 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6613 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6614 else 6615 case $cc_basename in 6616 xlc*) 6617 output_verbose_link_cmd='echo' 6618 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' 6619 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 6620 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's 6621 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6622 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 6623 ;; 6624 *) 6625 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6626 ;; 6627 esac 6628 fi 6629 ;; 6630 6631 dgux*) 6632 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6633 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6634 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6635 ;; 6636 6637 freebsd1*) 6638 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6639 ;; 6640 6641 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6642 # support. Future versions do this automatically, but an explicit c++rt0.o 6643 # does not break anything, and helps significantly (at the cost of a little 6644 # extra space). 6645 freebsd2.2*) 6646 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6647 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6648 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6649 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6650 ;; 6651 6652 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6653 freebsd2*) 6654 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6655 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6656 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6657 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6658 ;; 6659 6660 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6661 freebsd* | kfreebsd*-gnu | dragonfly*) 6662 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 6663 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6664 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6665 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6666 ;; 6667 6668 hpux9*) 6669 if test "$GCC" = yes; then 6670 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6671 else 6672 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6673 fi 6674 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6675 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6676 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6677 6678 # hardcode_minus_L: Not really in the search PATH, 6679 # but as the default location of the library. 6680 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6681 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6682 ;; 6683 6684 hpux10* | hpux11*) 6685 if test "$GCC" = yes -a "$with_gnu_ld" = no; then 6686 case "$host_cpu" in 6687 hppa*64*|ia64*) 6688 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6689 ;; 6690 *) 6691 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6692 ;; 6693 esac 6694 else 6695 case "$host_cpu" in 6696 hppa*64*|ia64*) 6697 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 6698 ;; 6699 *) 6700 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6701 ;; 6702 esac 6703 fi 6704 if test "$with_gnu_ld" = no; then 6705 case "$host_cpu" in 6706 hppa*64*) 6707 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6708 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6709 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6710 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6711 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6712 ;; 6713 ia64*) 6714 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6715 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6716 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6717 6718 # hardcode_minus_L: Not really in the search PATH, 6719 # but as the default location of the library. 6720 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6721 ;; 6722 *) 6723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6724 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6725 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6726 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6727 6728 # hardcode_minus_L: Not really in the search PATH, 6729 # but as the default location of the library. 6730 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6731 ;; 6732 esac 6733 fi 6734 ;; 6735 6736 irix5* | irix6* | nonstopux*) 6737 if test "$GCC" = yes; then 6738 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6739 else 6740 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 6741 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 6742 fi 6743 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6744 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6745 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6746 ;; 6747 6748 netbsd*) 6749 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6750 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6751 else 6752 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6753 fi 6754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6755 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6756 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6757 ;; 6758 6759 newsos6) 6760 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6761 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6762 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6763 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6764 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6765 ;; 6766 6767 openbsd*) 6768 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6769 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6770 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6771 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6772 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6773 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6774 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6775 else 6776 case $host_os in 6777 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6778 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6779 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6780 ;; 6781 *) 6782 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6783 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6784 ;; 6785 esac 6786 fi 6787 ;; 6788 6789 os2*) 6790 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6791 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6792 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 6793 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6794 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6795 ;; 6796 6797 osf3*) 6798 if test "$GCC" = yes; then 6799 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6800 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6801 else 6802 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6803 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6804 fi 6805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6806 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6807 ;; 6808 6809 osf4* | osf5*) # as osf3* with the addition of -msym flag 6810 if test "$GCC" = yes; then 6811 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6812 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6814 else 6815 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6816 _LT_AC_TAGVAR(archive_cmds, $1)='$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' 6817 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 6818 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 6819 6820 # Both c and cxx compiler support -rpath directly 6821 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6822 fi 6823 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 6824 ;; 6825 6826 sco3.2v5*) 6827 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6828 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6829 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6830 runpath_var=LD_RUN_PATH 6831 hardcode_runpath_var=yes 6832 ;; 6833 6834 solaris*) 6835 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6836 if test "$GCC" = yes; then 6837 wlarc='${wl}' 6838 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6839 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6840 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 6841 else 6842 wlarc='' 6843 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6844 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6845 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6846 fi 6847 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6848 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6849 case $host_os in 6850 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6851 *) 6852 # The compiler driver will combine linker options so we 6853 # cannot just pass the convience library names through 6854 # without $wl, iff we do not link with $LD. 6855 # Luckily, gcc supports the same syntax we need for Sun Studio. 6856 # Supported since Solaris 2.6 (maybe 2.5.1?) 6857 case $wlarc in 6858 '') 6859 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 6860 *) 6861 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; 6862 esac ;; 6863 esac 6864 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 6865 ;; 6866 6867 sunos4*) 6868 if test "x$host_vendor" = xsequent; then 6869 # Use $CC to link under sequent, because it throws in some extra .o 6870 # files that make .init and .fini sections work. 6871 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6872 else 6873 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6874 fi 6875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6876 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6877 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 6878 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6879 ;; 6880 6881 sysv4) 6882 case $host_vendor in 6883 sni) 6884 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6885 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6886 ;; 6887 siemens) 6888 ## LD is ld it makes a PLAMLIB 6889 ## CC just makes a GrossModule. 6890 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6891 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6892 _LT_AC_TAGVAR(hardcode_direct, $1)=no 6893 ;; 6894 motorola) 6895 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6896 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6897 ;; 6898 esac 6899 runpath_var='LD_RUN_PATH' 6900 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6901 ;; 6902 6903 sysv4.3*) 6904 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6905 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6906 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6907 ;; 6908 6909 sysv4*MP*) 6910 if test -d /usr/nec; then 6911 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6912 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6913 runpath_var=LD_RUN_PATH 6914 hardcode_runpath_var=yes 6915 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 6916 fi 6917 ;; 6918 6919 sysv4.2uw2*) 6920 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6921 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 6922 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6923 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6924 hardcode_runpath_var=yes 6925 runpath_var=LD_RUN_PATH 6926 ;; 6927 6928 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 6929 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' 6930 if test "$GCC" = yes; then 6931 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6932 else 6933 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6934 fi 6935 runpath_var='LD_RUN_PATH' 6936 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6937 ;; 6938 6939 sysv5*) 6940 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 6941 # $CC -shared without GNU ld will not create a library from C++ 6942 # object files and a static libstdc++, better avoid it by now 6943 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6944 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 6945 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 6946 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6947 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6948 runpath_var='LD_RUN_PATH' 6949 ;; 6950 6951 uts4*) 6952 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6953 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6954 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 6955 ;; 6956 6957 *) 6958 _LT_AC_TAGVAR(ld_shlibs, $1)=no 6959 ;; 6960 esac 6961 fi 6962]) 6963AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 6964test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6965 6966variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 6967if test "$GCC" = yes; then 6968 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 6969fi 6970 6971# 6972# Do we need to explicitly link libc? 6973# 6974case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 6975x|xyes) 6976 # Assume -lc should be added 6977 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 6978 6979 if test "$enable_shared" = yes && test "$GCC" = yes; then 6980 case $_LT_AC_TAGVAR(archive_cmds, $1) in 6981 *'~'*) 6982 # FIXME: we may have to deal with multi-command sequences. 6983 ;; 6984 '$CC '*) 6985 # Test whether the compiler implicitly links with -lc since on some 6986 # systems, -lgcc has to come before -lc. If gcc already passes -lc 6987 # to ld, don't add -lc before -lgcc. 6988 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 6989 $rm conftest* 6990 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 6991 6992 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6993 soname=conftest 6994 lib=conftest 6995 libobjs=conftest.$ac_objext 6996 deplibs= 6997 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6998 compiler_flags=-v 6999 linker_flags=-v 7000 verstring= 7001 output_objdir=. 7002 libname=conftest 7003 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 7004 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7005 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 7006 then 7007 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7008 else 7009 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7010 fi 7011 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7012 else 7013 cat conftest.err 1>&5 7014 fi 7015 $rm conftest* 7016 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 7017 ;; 7018 esac 7019 fi 7020 ;; 7021esac 7022])# AC_LIBTOOL_PROG_LD_SHLIBS 7023 7024 7025# _LT_AC_FILE_LTDLL_C 7026# ------------------- 7027# Be careful that the start marker always follows a newline. 7028AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 7029# /* ltdll.c starts here */ 7030# #define WIN32_LEAN_AND_MEAN 7031# #include <windows.h> 7032# #undef WIN32_LEAN_AND_MEAN 7033# #include <stdio.h> 7034# 7035# #ifndef __CYGWIN__ 7036# # ifdef __CYGWIN32__ 7037# # define __CYGWIN__ __CYGWIN32__ 7038# # endif 7039# #endif 7040# 7041# #ifdef __cplusplus 7042# extern "C" { 7043# #endif 7044# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 7045# #ifdef __cplusplus 7046# } 7047# #endif 7048# 7049# #ifdef __CYGWIN__ 7050# #include <cygwin/cygwin_dll.h> 7051# DECLARE_CYGWIN_DLL( DllMain ); 7052# #endif 7053# HINSTANCE __hDllInstance_base; 7054# 7055# BOOL APIENTRY 7056# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 7057# { 7058# __hDllInstance_base = hInst; 7059# return TRUE; 7060# } 7061# /* ltdll.c ends here */ 7062])# _LT_AC_FILE_LTDLL_C 7063 7064 7065# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 7066# --------------------------------- 7067AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 7068 7069 7070# old names 7071AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 7072AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7073AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7074AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7075AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7076AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 7077AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 7078 7079# This is just to silence aclocal about the macro not being used 7080ifelse([AC_DISABLE_FAST_INSTALL]) 7081 7082AC_DEFUN([LT_AC_PROG_GCJ], 7083[AC_CHECK_TOOL(GCJ, gcj, no) 7084 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7085 AC_SUBST(GCJFLAGS) 7086]) 7087 7088AC_DEFUN([LT_AC_PROG_RC], 7089[AC_CHECK_TOOL(RC, windres, no) 7090]) 7091 7092# NOTE: This macro has been submitted for inclusion into # 7093# GNU Autoconf as AC_PROG_SED. When it is available in # 7094# a released version of Autoconf we should remove this # 7095# macro and use it instead. # 7096# LT_AC_PROG_SED 7097# -------------- 7098# Check for a fully-functional sed program, that truncates 7099# as few characters as possible. Prefer GNU sed if found. 7100AC_DEFUN([LT_AC_PROG_SED], 7101[AC_MSG_CHECKING([for a sed that does not truncate output]) 7102AC_CACHE_VAL(lt_cv_path_SED, 7103[# Loop through the user's path and test for sed and gsed. 7104# Then use that list of sed's as ones to test for truncation. 7105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7106for as_dir in $PATH 7107do 7108 IFS=$as_save_IFS 7109 test -z "$as_dir" && as_dir=. 7110 for lt_ac_prog in sed gsed; do 7111 for ac_exec_ext in '' $ac_executable_extensions; do 7112 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7113 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7114 fi 7115 done 7116 done 7117done 7118lt_ac_max=0 7119lt_ac_count=0 7120# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7121# along with /bin/sed that truncates output. 7122for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7123 test ! -f $lt_ac_sed && continue 7124 cat /dev/null > conftest.in 7125 lt_ac_count=0 7126 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7127 # Check for GNU sed and select it if it is found. 7128 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7129 lt_cv_path_SED=$lt_ac_sed 7130 break 7131 fi 7132 while true; do 7133 cat conftest.in conftest.in >conftest.tmp 7134 mv conftest.tmp conftest.in 7135 cp conftest.in conftest.nl 7136 echo >>conftest.nl 7137 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7138 cmp -s conftest.out conftest.nl || break 7139 # 10000 chars as input seems more than enough 7140 test $lt_ac_count -gt 10 && break 7141 lt_ac_count=`expr $lt_ac_count + 1` 7142 if test $lt_ac_count -gt $lt_ac_max; then 7143 lt_ac_max=$lt_ac_count 7144 lt_cv_path_SED=$lt_ac_sed 7145 fi 7146 done 7147done 7148]) 7149SED=$lt_cv_path_SED 7150AC_MSG_RESULT([$SED]) 7151]) 7152 7153 7154# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 7155 7156# This program is free software; you can redistribute it and/or modify 7157# it under the terms of the GNU General Public License as published by 7158# the Free Software Foundation; either version 2, or (at your option) 7159# any later version. 7160 7161# This program is distributed in the hope that it will be useful, 7162# but WITHOUT ANY WARRANTY; without even the implied warranty of 7163# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 7164# GNU General Public License for more details. 7165 7166# You should have received a copy of the GNU General Public License 7167# along with this program; if not, write to the Free Software 7168# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 7169# 02111-1307, USA. 7170 7171# serial 3 7172 7173AC_PREREQ(2.50) 7174 7175# AM_PROG_LEX 7176# ----------- 7177# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a 7178# "missing" invocation, for better error output. 7179AC_DEFUN([AM_PROG_LEX], 7180[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl 7181AC_REQUIRE([AC_PROG_LEX])dnl 7182if test "$LEX" = :; then 7183 LEX=${am_missing_run}flex 7184fi]) 7185 7186# gettext.m4 serial 36 (gettext-0.14.3) 7187dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. 7188dnl This file is free software; the Free Software Foundation 7189dnl gives unlimited permission to copy and/or distribute it, 7190dnl with or without modifications, as long as this notice is preserved. 7191dnl 7192dnl This file can can be used in projects which are not available under 7193dnl the GNU General Public License or the GNU Library General Public 7194dnl License but which still want to provide support for the GNU gettext 7195dnl functionality. 7196dnl Please note that the actual code of the GNU gettext library is covered 7197dnl by the GNU Library General Public License, and the rest of the GNU 7198dnl gettext package package is covered by the GNU General Public License. 7199dnl They are *not* in the public domain. 7200 7201dnl Authors: 7202dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 7203dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 7204 7205dnl Macro to add for using GNU gettext. 7206 7207dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 7208dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 7209dnl default (if it is not specified or empty) is 'no-libtool'. 7210dnl INTLSYMBOL should be 'external' for packages with no intl directory, 7211dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. 7212dnl If INTLSYMBOL is 'use-libtool', then a libtool library 7213dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 7214dnl depending on --{enable,disable}-{shared,static} and on the presence of 7215dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 7216dnl $(top_builddir)/intl/libintl.a will be created. 7217dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 7218dnl implementations (in libc or libintl) without the ngettext() function 7219dnl will be ignored. If NEEDSYMBOL is specified and is 7220dnl 'need-formatstring-macros', then GNU gettext implementations that don't 7221dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 7222dnl INTLDIR is used to find the intl libraries. If empty, 7223dnl the value `$(top_builddir)/intl/' is used. 7224dnl 7225dnl The result of the configuration is one of three cases: 7226dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 7227dnl and used. 7228dnl Catalog format: GNU --> install in $(datadir) 7229dnl Catalog extension: .mo after installation, .gmo in source tree 7230dnl 2) GNU gettext has been found in the system's C library. 7231dnl Catalog format: GNU --> install in $(datadir) 7232dnl Catalog extension: .mo after installation, .gmo in source tree 7233dnl 3) No internationalization, always use English msgid. 7234dnl Catalog format: none 7235dnl Catalog extension: none 7236dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 7237dnl The use of .gmo is historical (it was needed to avoid overwriting the 7238dnl GNU format catalogs when building on a platform with an X/Open gettext), 7239dnl but we keep it in order not to force irrelevant filename changes on the 7240dnl maintainers. 7241dnl 7242AC_DEFUN([AM_GNU_GETTEXT], 7243[ 7244 dnl Argument checking. 7245 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 7246 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 7247])])])])]) 7248 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 7249 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 7250])])])]) 7251 define([gt_included_intl], ifelse([$1], [external], [no], [yes])) 7252 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) 7253 7254 AC_REQUIRE([AM_PO_SUBDIRS])dnl 7255 ifelse(gt_included_intl, yes, [ 7256 AC_REQUIRE([AM_INTL_SUBDIR])dnl 7257 ]) 7258 7259 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 7260 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 7261 AC_REQUIRE([AC_LIB_RPATH]) 7262 7263 dnl Sometimes libintl requires libiconv, so first search for libiconv. 7264 dnl Ideally we would do this search only after the 7265 dnl if test "$USE_NLS" = "yes"; then 7266 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then 7267 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 7268 dnl the configure script would need to contain the same shell code 7269 dnl again, outside any 'if'. There are two solutions: 7270 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 7271 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 7272 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 7273 dnl documented, we avoid it. 7274 ifelse(gt_included_intl, yes, , [ 7275 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 7276 ]) 7277 7278 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. 7279 gt_INTL_MACOSX 7280 7281 dnl Set USE_NLS. 7282 AM_NLS 7283 7284 ifelse(gt_included_intl, yes, [ 7285 BUILD_INCLUDED_LIBINTL=no 7286 USE_INCLUDED_LIBINTL=no 7287 ]) 7288 LIBINTL= 7289 LTLIBINTL= 7290 POSUB= 7291 7292 dnl If we use NLS figure out what method 7293 if test "$USE_NLS" = "yes"; then 7294 gt_use_preinstalled_gnugettext=no 7295 ifelse(gt_included_intl, yes, [ 7296 AC_MSG_CHECKING([whether included gettext is requested]) 7297 AC_ARG_WITH(included-gettext, 7298 [ --with-included-gettext use the GNU gettext library included here], 7299 nls_cv_force_use_gnu_gettext=$withval, 7300 nls_cv_force_use_gnu_gettext=no) 7301 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 7302 7303 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 7304 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 7305 ]) 7306 dnl User does not insist on using GNU NLS library. Figure out what 7307 dnl to use. If GNU gettext is available we use this. Else we have 7308 dnl to fall back to GNU NLS library. 7309 7310 dnl Add a version number to the cache macros. 7311 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) 7312 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) 7313 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) 7314 7315 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 7316 [AC_TRY_LINK([#include <libintl.h> 7317]ifelse([$2], [need-formatstring-macros], 7318[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 7319#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 7320#endif 7321changequote(,)dnl 7322typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 7323changequote([,])dnl 7324], [])[extern int _nl_msg_cat_cntr; 7325extern int *_nl_domain_bindings;], 7326 [bindtextdomain ("", ""); 7327return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], 7328 gt_cv_func_gnugettext_libc=yes, 7329 gt_cv_func_gnugettext_libc=no)]) 7330 7331 if test "$gt_cv_func_gnugettext_libc" != "yes"; then 7332 dnl Sometimes libintl requires libiconv, so first search for libiconv. 7333 ifelse(gt_included_intl, yes, , [ 7334 AM_ICONV_LINK 7335 ]) 7336 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 7337 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 7338 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 7339 dnl even if libiconv doesn't exist. 7340 AC_LIB_LINKFLAGS_BODY([intl]) 7341 AC_CACHE_CHECK([for GNU gettext in libintl], 7342 gt_cv_func_gnugettext_libintl, 7343 [gt_save_CPPFLAGS="$CPPFLAGS" 7344 CPPFLAGS="$CPPFLAGS $INCINTL" 7345 gt_save_LIBS="$LIBS" 7346 LIBS="$LIBS $LIBINTL" 7347 dnl Now see whether libintl exists and does not depend on libiconv. 7348 AC_TRY_LINK([#include <libintl.h> 7349]ifelse([$2], [need-formatstring-macros], 7350[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 7351#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 7352#endif 7353changequote(,)dnl 7354typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 7355changequote([,])dnl 7356], [])[extern int _nl_msg_cat_cntr; 7357extern 7358#ifdef __cplusplus 7359"C" 7360#endif 7361const char *_nl_expand_alias (const char *);], 7362 [bindtextdomain ("", ""); 7363return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 7364 gt_cv_func_gnugettext_libintl=yes, 7365 gt_cv_func_gnugettext_libintl=no) 7366 dnl Now see whether libintl exists and depends on libiconv. 7367 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then 7368 LIBS="$LIBS $LIBICONV" 7369 AC_TRY_LINK([#include <libintl.h> 7370]ifelse([$2], [need-formatstring-macros], 7371[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 7372#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 7373#endif 7374changequote(,)dnl 7375typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 7376changequote([,])dnl 7377], [])[extern int _nl_msg_cat_cntr; 7378extern 7379#ifdef __cplusplus 7380"C" 7381#endif 7382const char *_nl_expand_alias (const char *);], 7383 [bindtextdomain ("", ""); 7384return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 7385 [LIBINTL="$LIBINTL $LIBICONV" 7386 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 7387 gt_cv_func_gnugettext_libintl=yes 7388 ]) 7389 fi 7390 CPPFLAGS="$gt_save_CPPFLAGS" 7391 LIBS="$gt_save_LIBS"]) 7392 fi 7393 7394 dnl If an already present or preinstalled GNU gettext() is found, 7395 dnl use it. But if this macro is used in GNU gettext, and GNU 7396 dnl gettext is already preinstalled in libintl, we update this 7397 dnl libintl. (Cf. the install rule in intl/Makefile.in.) 7398 if test "$gt_cv_func_gnugettext_libc" = "yes" \ 7399 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 7400 && test "$PACKAGE" != gettext-runtime \ 7401 && test "$PACKAGE" != gettext-tools; }; then 7402 gt_use_preinstalled_gnugettext=yes 7403 else 7404 dnl Reset the values set by searching for libintl. 7405 LIBINTL= 7406 LTLIBINTL= 7407 INCINTL= 7408 fi 7409 7410 ifelse(gt_included_intl, yes, [ 7411 if test "$gt_use_preinstalled_gnugettext" != "yes"; then 7412 dnl GNU gettext is not found in the C library. 7413 dnl Fall back on included GNU gettext library. 7414 nls_cv_use_gnu_gettext=yes 7415 fi 7416 fi 7417 7418 if test "$nls_cv_use_gnu_gettext" = "yes"; then 7419 dnl Mark actions used to generate GNU NLS library. 7420 BUILD_INCLUDED_LIBINTL=yes 7421 USE_INCLUDED_LIBINTL=yes 7422 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" 7423 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" 7424 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 7425 fi 7426 7427 CATOBJEXT= 7428 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 7429 || test "$nls_cv_use_gnu_gettext" = "yes"; then 7430 dnl Mark actions to use GNU gettext tools. 7431 CATOBJEXT=.gmo 7432 fi 7433 ]) 7434 7435 if test -n "$INTL_MACOSX_LIBS"; then 7436 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 7437 || test "$nls_cv_use_gnu_gettext" = "yes"; then 7438 dnl Some extra flags are needed during linking. 7439 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" 7440 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" 7441 fi 7442 fi 7443 7444 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 7445 || test "$nls_cv_use_gnu_gettext" = "yes"; then 7446 AC_DEFINE(ENABLE_NLS, 1, 7447 [Define to 1 if translation of program messages to the user's native language 7448 is requested.]) 7449 else 7450 USE_NLS=no 7451 fi 7452 fi 7453 7454 AC_MSG_CHECKING([whether to use NLS]) 7455 AC_MSG_RESULT([$USE_NLS]) 7456 if test "$USE_NLS" = "yes"; then 7457 AC_MSG_CHECKING([where the gettext function comes from]) 7458 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 7459 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 7460 gt_source="external libintl" 7461 else 7462 gt_source="libc" 7463 fi 7464 else 7465 gt_source="included intl directory" 7466 fi 7467 AC_MSG_RESULT([$gt_source]) 7468 fi 7469 7470 if test "$USE_NLS" = "yes"; then 7471 7472 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 7473 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 7474 AC_MSG_CHECKING([how to link with libintl]) 7475 AC_MSG_RESULT([$LIBINTL]) 7476 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 7477 fi 7478 7479 dnl For backward compatibility. Some packages may be using this. 7480 AC_DEFINE(HAVE_GETTEXT, 1, 7481 [Define if the GNU gettext() function is already present or preinstalled.]) 7482 AC_DEFINE(HAVE_DCGETTEXT, 1, 7483 [Define if the GNU dcgettext() function is already present or preinstalled.]) 7484 fi 7485 7486 dnl We need to process the po/ directory. 7487 POSUB=po 7488 fi 7489 7490 ifelse(gt_included_intl, yes, [ 7491 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 7492 dnl to 'yes' because some of the testsuite requires it. 7493 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 7494 BUILD_INCLUDED_LIBINTL=yes 7495 fi 7496 7497 dnl Make all variables we use known to autoconf. 7498 AC_SUBST(BUILD_INCLUDED_LIBINTL) 7499 AC_SUBST(USE_INCLUDED_LIBINTL) 7500 AC_SUBST(CATOBJEXT) 7501 7502 dnl For backward compatibility. Some configure.ins may be using this. 7503 nls_cv_header_intl= 7504 nls_cv_header_libgt= 7505 7506 dnl For backward compatibility. Some Makefiles may be using this. 7507 DATADIRNAME=share 7508 AC_SUBST(DATADIRNAME) 7509 7510 dnl For backward compatibility. Some Makefiles may be using this. 7511 INSTOBJEXT=.mo 7512 AC_SUBST(INSTOBJEXT) 7513 7514 dnl For backward compatibility. Some Makefiles may be using this. 7515 GENCAT=gencat 7516 AC_SUBST(GENCAT) 7517 7518 dnl For backward compatibility. Some Makefiles may be using this. 7519 INTLOBJS= 7520 if test "$USE_INCLUDED_LIBINTL" = yes; then 7521 INTLOBJS="\$(GETTOBJS)" 7522 fi 7523 AC_SUBST(INTLOBJS) 7524 7525 dnl Enable libtool support if the surrounding package wishes it. 7526 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 7527 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 7528 ]) 7529 7530 dnl For backward compatibility. Some Makefiles may be using this. 7531 INTLLIBS="$LIBINTL" 7532 AC_SUBST(INTLLIBS) 7533 7534 dnl Make all documented variables known to autoconf. 7535 AC_SUBST(LIBINTL) 7536 AC_SUBST(LTLIBINTL) 7537 AC_SUBST(POSUB) 7538]) 7539 7540 7541dnl Checks for all prerequisites of the intl subdirectory, 7542dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, 7543dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. 7544AC_DEFUN([AM_INTL_SUBDIR], 7545[ 7546 AC_REQUIRE([AC_PROG_INSTALL])dnl 7547 AC_REQUIRE([AM_MKINSTALLDIRS])dnl 7548 AC_REQUIRE([AC_PROG_CC])dnl 7549 AC_REQUIRE([AC_CANONICAL_HOST])dnl 7550 AC_REQUIRE([gt_GLIBC2])dnl 7551 AC_REQUIRE([AC_PROG_RANLIB])dnl 7552 AC_REQUIRE([AC_ISC_POSIX])dnl 7553 AC_REQUIRE([AC_HEADER_STDC])dnl 7554 AC_REQUIRE([AC_C_CONST])dnl 7555 AC_REQUIRE([bh_C_SIGNED])dnl 7556 AC_REQUIRE([AC_C_INLINE])dnl 7557 AC_REQUIRE([AC_TYPE_OFF_T])dnl 7558 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 7559 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl 7560 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl 7561 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl 7562 AC_REQUIRE([gt_TYPE_WINT_T])dnl 7563 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 7564 AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 7565 AC_REQUIRE([gt_TYPE_INTMAX_T]) 7566 AC_REQUIRE([gt_PRINTF_POSIX]) 7567 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 7568 AC_REQUIRE([AC_FUNC_MMAP])dnl 7569 AC_REQUIRE([gl_GLIBC21])dnl 7570 AC_REQUIRE([gt_INTDIV0])dnl 7571 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl 7572 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl 7573 AC_REQUIRE([gt_INTTYPES_PRI])dnl 7574 AC_REQUIRE([gl_XSIZE])dnl 7575 AC_REQUIRE([gt_INTL_MACOSX])dnl 7576 7577 AC_CHECK_TYPE([ptrdiff_t], , 7578 [AC_DEFINE([ptrdiff_t], [long], 7579 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) 7580 ]) 7581 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 7582stdlib.h string.h unistd.h sys/param.h]) 7583 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ 7584mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ 7585strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ 7586__fsetlocking]) 7587 7588 dnl Use the _snprintf function only if it is declared (because on NetBSD it 7589 dnl is defined as a weak alias of snprintf; we prefer to use the latter). 7590 gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) 7591 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) 7592 7593 dnl Use the *_unlocked functions only if they are declared. 7594 dnl (because some of them were defined without being declared in Solaris 7595 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built 7596 dnl on Solaris 2.5.1 to run on Solaris 2.6). 7597 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. 7598 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) 7599 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) 7600 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) 7601 7602 case $gt_cv_func_printf_posix in 7603 *yes) HAVE_POSIX_PRINTF=1 ;; 7604 *) HAVE_POSIX_PRINTF=0 ;; 7605 esac 7606 AC_SUBST([HAVE_POSIX_PRINTF]) 7607 if test "$ac_cv_func_asprintf" = yes; then 7608 HAVE_ASPRINTF=1 7609 else 7610 HAVE_ASPRINTF=0 7611 fi 7612 AC_SUBST([HAVE_ASPRINTF]) 7613 if test "$ac_cv_func_snprintf" = yes; then 7614 HAVE_SNPRINTF=1 7615 else 7616 HAVE_SNPRINTF=0 7617 fi 7618 AC_SUBST([HAVE_SNPRINTF]) 7619 if test "$ac_cv_func_wprintf" = yes; then 7620 HAVE_WPRINTF=1 7621 else 7622 HAVE_WPRINTF=0 7623 fi 7624 AC_SUBST([HAVE_WPRINTF]) 7625 7626 AM_ICONV 7627 AM_LANGINFO_CODESET 7628 if test $ac_cv_header_locale_h = yes; then 7629 gt_LC_MESSAGES 7630 fi 7631 7632 if test -n "$INTL_MACOSX_LIBS"; then 7633 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" 7634 fi 7635 7636 dnl intl/plural.c is generated from intl/plural.y. It requires bison, 7637 dnl because plural.y uses bison specific features. It requires at least 7638 dnl bison-1.26 because earlier versions generate a plural.c that doesn't 7639 dnl compile. 7640 dnl bison is only needed for the maintainer (who touches plural.y). But in 7641 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put 7642 dnl the rule in general Makefile. Now, some people carelessly touch the 7643 dnl files or have a broken "make" program, hence the plural.c rule will 7644 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not 7645 dnl present or too old. 7646 AC_CHECK_PROGS([INTLBISON], [bison]) 7647 if test -z "$INTLBISON"; then 7648 ac_verc_fail=yes 7649 else 7650 dnl Found it, now check the version. 7651 AC_MSG_CHECKING([version of bison]) 7652changequote(<<,>>)dnl 7653 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` 7654 case $ac_prog_version in 7655 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 7656 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) 7657changequote([,])dnl 7658 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; 7659 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; 7660 esac 7661 AC_MSG_RESULT([$ac_prog_version]) 7662 fi 7663 if test $ac_verc_fail = yes; then 7664 INTLBISON=: 7665 fi 7666]) 7667 7668 7669dnl Checks for special options needed on MacOS X. 7670dnl Defines INTL_MACOSX_LIBS. 7671AC_DEFUN([gt_INTL_MACOSX], 7672[ 7673 dnl Check for API introduced in MacOS X 10.2. 7674 AC_CACHE_CHECK([for CFPreferencesCopyAppValue], 7675 gt_cv_func_CFPreferencesCopyAppValue, 7676 [gt_save_CPPFLAGS="$CPPFLAGS" 7677 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" 7678 gt_save_LIBS="$LIBS" 7679 LIBS="$LIBS -framework CoreFoundation" 7680 AC_TRY_LINK([#include <CFPreferences.h>], 7681 [CFPreferencesCopyAppValue(NULL, NULL)], 7682 [gt_cv_func_CFPreferencesCopyAppValue=yes], 7683 [gt_cv_func_CFPreferencesCopyAppValue=no]) 7684 CPPFLAGS="$gt_save_CPPFLAGS" 7685 LIBS="$gt_save_LIBS"]) 7686 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 7687 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, 7688 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) 7689 fi 7690 dnl Check for API introduced in MacOS X 10.3. 7691 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, 7692 [gt_save_CPPFLAGS="$CPPFLAGS" 7693 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" 7694 gt_save_LIBS="$LIBS" 7695 LIBS="$LIBS -framework CoreFoundation" 7696 AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();], 7697 [gt_cv_func_CFLocaleCopyCurrent=yes], 7698 [gt_cv_func_CFLocaleCopyCurrent=no]) 7699 CPPFLAGS="$gt_save_CPPFLAGS" 7700 LIBS="$gt_save_LIBS"]) 7701 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 7702 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, 7703 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) 7704 fi 7705 INTL_MACOSX_LIBS= 7706 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 7707 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 7708 fi 7709 AC_SUBST([INTL_MACOSX_LIBS]) 7710]) 7711 7712 7713dnl gt_CHECK_DECL(FUNC, INCLUDES) 7714dnl Check whether a function is declared. 7715AC_DEFUN([gt_CHECK_DECL], 7716[ 7717 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, 7718 [AC_TRY_COMPILE([$2], [ 7719#ifndef $1 7720 char *p = (char *) $1; 7721#endif 7722], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) 7723 if test $ac_cv_have_decl_$1 = yes; then 7724 gt_value=1 7725 else 7726 gt_value=0 7727 fi 7728 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], 7729 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) 7730]) 7731 7732 7733dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 7734AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 7735 7736# po.m4 serial 7 (gettext-0.14.3) 7737dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. 7738dnl This file is free software; the Free Software Foundation 7739dnl gives unlimited permission to copy and/or distribute it, 7740dnl with or without modifications, as long as this notice is preserved. 7741dnl 7742dnl This file can can be used in projects which are not available under 7743dnl the GNU General Public License or the GNU Library General Public 7744dnl License but which still want to provide support for the GNU gettext 7745dnl functionality. 7746dnl Please note that the actual code of the GNU gettext library is covered 7747dnl by the GNU Library General Public License, and the rest of the GNU 7748dnl gettext package package is covered by the GNU General Public License. 7749dnl They are *not* in the public domain. 7750 7751dnl Authors: 7752dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 7753dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 7754 7755AC_PREREQ(2.50) 7756 7757dnl Checks for all prerequisites of the po subdirectory. 7758AC_DEFUN([AM_PO_SUBDIRS], 7759[ 7760 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 7761 AC_REQUIRE([AC_PROG_INSTALL])dnl 7762 AC_REQUIRE([AM_MKINSTALLDIRS])dnl 7763 AC_REQUIRE([AM_NLS])dnl 7764 7765 dnl Perform the following tests also if --disable-nls has been given, 7766 dnl because they are needed for "make dist" to work. 7767 7768 dnl Search for GNU msgfmt in the PATH. 7769 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. 7770 dnl The second test excludes FreeBSD msgfmt. 7771 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 7772 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 7773 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 7774 :) 7775 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 7776 7777 dnl Search for GNU xgettext 0.12 or newer in the PATH. 7778 dnl The first test excludes Solaris xgettext and early GNU xgettext versions. 7779 dnl The second test excludes FreeBSD xgettext. 7780 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 7781 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 7782 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 7783 :) 7784 dnl Remove leftover from FreeBSD xgettext call. 7785 rm -f messages.po 7786 7787 dnl Search for GNU msgmerge 0.11 or newer in the PATH. 7788 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 7789 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) 7790 7791 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 7792 dnl Test whether we really found GNU msgfmt. 7793 if test "$GMSGFMT" != ":"; then 7794 dnl If it is no GNU msgfmt we define it as : so that the 7795 dnl Makefiles still can work. 7796 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && 7797 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 7798 : ; 7799 else 7800 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` 7801 AC_MSG_RESULT( 7802 [found $GMSGFMT program is not GNU msgfmt; ignore it]) 7803 GMSGFMT=":" 7804 fi 7805 fi 7806 7807 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 7808 dnl Test whether we really found GNU xgettext. 7809 if test "$XGETTEXT" != ":"; then 7810 dnl If it is no GNU xgettext we define it as : so that the 7811 dnl Makefiles still can work. 7812 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && 7813 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 7814 : ; 7815 else 7816 AC_MSG_RESULT( 7817 [found xgettext program is not GNU xgettext; ignore it]) 7818 XGETTEXT=":" 7819 fi 7820 dnl Remove leftover from FreeBSD xgettext call. 7821 rm -f messages.po 7822 fi 7823 7824 AC_OUTPUT_COMMANDS([ 7825 for ac_file in $CONFIG_FILES; do 7826 # Support "outfile[:infile[:infile...]]" 7827 case "$ac_file" in 7828 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 7829 esac 7830 # PO directories have a Makefile.in generated from Makefile.in.in. 7831 case "$ac_file" in */Makefile.in) 7832 # Adjust a relative srcdir. 7833 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 7834 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 7835 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 7836 # In autoconf-2.13 it is called $ac_given_srcdir. 7837 # In autoconf-2.50 it is called $srcdir. 7838 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 7839 case "$ac_given_srcdir" in 7840 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 7841 /*) top_srcdir="$ac_given_srcdir" ;; 7842 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 7843 esac 7844 # Treat a directory as a PO directory if and only if it has a 7845 # POTFILES.in file. This allows packages to have multiple PO 7846 # directories under different names or in different locations. 7847 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 7848 rm -f "$ac_dir/POTFILES" 7849 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 7850 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 7851 POMAKEFILEDEPS="POTFILES.in" 7852 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend 7853 # on $ac_dir but don't depend on user-specified configuration 7854 # parameters. 7855 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 7856 # The LINGUAS file contains the set of available languages. 7857 if test -n "$OBSOLETE_ALL_LINGUAS"; then 7858 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 7859 fi 7860 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 7861 # Hide the ALL_LINGUAS assigment from automake. 7862 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 7863 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 7864 else 7865 # The set of available languages was given in configure.in. 7866 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 7867 fi 7868 # Compute POFILES 7869 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 7870 # Compute UPDATEPOFILES 7871 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 7872 # Compute DUMMYPOFILES 7873 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 7874 # Compute GMOFILES 7875 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 7876 case "$ac_given_srcdir" in 7877 .) srcdirpre= ;; 7878 *) srcdirpre='$(srcdir)/' ;; 7879 esac 7880 POFILES= 7881 UPDATEPOFILES= 7882 DUMMYPOFILES= 7883 GMOFILES= 7884 for lang in $ALL_LINGUAS; do 7885 POFILES="$POFILES $srcdirpre$lang.po" 7886 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 7887 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 7888 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 7889 done 7890 # CATALOGS depends on both $ac_dir and the user's LINGUAS 7891 # environment variable. 7892 INST_LINGUAS= 7893 if test -n "$ALL_LINGUAS"; then 7894 for presentlang in $ALL_LINGUAS; do 7895 useit=no 7896 if test "%UNSET%" != "$LINGUAS"; then 7897 desiredlanguages="$LINGUAS" 7898 else 7899 desiredlanguages="$ALL_LINGUAS" 7900 fi 7901 for desiredlang in $desiredlanguages; do 7902 # Use the presentlang catalog if desiredlang is 7903 # a. equal to presentlang, or 7904 # b. a variant of presentlang (because in this case, 7905 # presentlang can be used as a fallback for messages 7906 # which are not translated in the desiredlang catalog). 7907 case "$desiredlang" in 7908 "$presentlang"*) useit=yes;; 7909 esac 7910 done 7911 if test $useit = yes; then 7912 INST_LINGUAS="$INST_LINGUAS $presentlang" 7913 fi 7914 done 7915 fi 7916 CATALOGS= 7917 if test -n "$INST_LINGUAS"; then 7918 for lang in $INST_LINGUAS; do 7919 CATALOGS="$CATALOGS $lang.gmo" 7920 done 7921 fi 7922 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 7923 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 7924 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 7925 if test -f "$f"; then 7926 case "$f" in 7927 *.orig | *.bak | *~) ;; 7928 *) cat "$f" >> "$ac_dir/Makefile" ;; 7929 esac 7930 fi 7931 done 7932 fi 7933 ;; 7934 esac 7935 done], 7936 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 7937 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it 7938 # from automake. 7939 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' 7940 # Capture the value of LINGUAS because we need it to compute CATALOGS. 7941 LINGUAS="${LINGUAS-%UNSET%}" 7942 ]) 7943]) 7944 7945dnl Postprocesses a Makefile in a directory containing PO files. 7946AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], 7947[ 7948 # When this code is run, in config.status, two variables have already been 7949 # set: 7950 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, 7951 # - LINGUAS is the value of the environment variable LINGUAS at configure 7952 # time. 7953 7954changequote(,)dnl 7955 # Adjust a relative srcdir. 7956 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 7957 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 7958 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 7959 # In autoconf-2.13 it is called $ac_given_srcdir. 7960 # In autoconf-2.50 it is called $srcdir. 7961 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 7962 case "$ac_given_srcdir" in 7963 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 7964 /*) top_srcdir="$ac_given_srcdir" ;; 7965 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 7966 esac 7967 7968 # Find a way to echo strings without interpreting backslash. 7969 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then 7970 gt_echo='echo' 7971 else 7972 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then 7973 gt_echo='printf %s\n' 7974 else 7975 echo_func () { 7976 cat <<EOT 7977$* 7978EOT 7979 } 7980 gt_echo='echo_func' 7981 fi 7982 fi 7983 7984 # A sed script that extracts the value of VARIABLE from a Makefile. 7985 sed_x_variable=' 7986# Test if the hold space is empty. 7987x 7988s/P/P/ 7989x 7990ta 7991# Yes it was empty. Look if we have the expected variable definition. 7992/^[ ]*VARIABLE[ ]*=/{ 7993 # Seen the first line of the variable definition. 7994 s/^[ ]*VARIABLE[ ]*=// 7995 ba 7996} 7997bd 7998:a 7999# Here we are processing a line from the variable definition. 8000# Remove comment, more precisely replace it with a space. 8001s/#.*$/ / 8002# See if the line ends in a backslash. 8003tb 8004:b 8005s/\\$// 8006# Print the line, without the trailing backslash. 8007p 8008tc 8009# There was no trailing backslash. The end of the variable definition is 8010# reached. Clear the hold space. 8011s/^.*$// 8012x 8013bd 8014:c 8015# A trailing backslash means that the variable definition continues in the 8016# next line. Put a nonempty string into the hold space to indicate this. 8017s/^.*$/P/ 8018x 8019:d 8020' 8021changequote([,])dnl 8022 8023 # Set POTFILES to the value of the Makefile variable POTFILES. 8024 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`" 8025 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` 8026 # Compute POTFILES_DEPS as 8027 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) 8028 POTFILES_DEPS= 8029 for file in $POTFILES; do 8030 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" 8031 done 8032 POMAKEFILEDEPS="" 8033 8034 if test -n "$OBSOLETE_ALL_LINGUAS"; then 8035 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 8036 fi 8037 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 8038 # The LINGUAS file contains the set of available languages. 8039 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 8040 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 8041 else 8042 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. 8043 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`" 8044 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` 8045 fi 8046 # Hide the ALL_LINGUAS assigment from automake. 8047 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 8048 # Compute POFILES 8049 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 8050 # Compute UPDATEPOFILES 8051 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 8052 # Compute DUMMYPOFILES 8053 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 8054 # Compute GMOFILES 8055 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 8056 # Compute PROPERTIESFILES 8057 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) 8058 # Compute CLASSFILES 8059 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) 8060 # Compute QMFILES 8061 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) 8062 # Compute MSGFILES 8063 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) 8064 # Compute RESOURCESDLLFILES 8065 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) 8066 case "$ac_given_srcdir" in 8067 .) srcdirpre= ;; 8068 *) srcdirpre='$(srcdir)/' ;; 8069 esac 8070 POFILES= 8071 UPDATEPOFILES= 8072 DUMMYPOFILES= 8073 GMOFILES= 8074 PROPERTIESFILES= 8075 CLASSFILES= 8076 QMFILES= 8077 MSGFILES= 8078 RESOURCESDLLFILES= 8079 for lang in $ALL_LINGUAS; do 8080 POFILES="$POFILES $srcdirpre$lang.po" 8081 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 8082 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 8083 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 8084 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" 8085 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" 8086 QMFILES="$QMFILES $srcdirpre$lang.qm" 8087 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 8088 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" 8089 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 8090 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" 8091 done 8092 # CATALOGS depends on both $ac_dir and the user's LINGUAS 8093 # environment variable. 8094 INST_LINGUAS= 8095 if test -n "$ALL_LINGUAS"; then 8096 for presentlang in $ALL_LINGUAS; do 8097 useit=no 8098 if test "%UNSET%" != "$LINGUAS"; then 8099 desiredlanguages="$LINGUAS" 8100 else 8101 desiredlanguages="$ALL_LINGUAS" 8102 fi 8103 for desiredlang in $desiredlanguages; do 8104 # Use the presentlang catalog if desiredlang is 8105 # a. equal to presentlang, or 8106 # b. a variant of presentlang (because in this case, 8107 # presentlang can be used as a fallback for messages 8108 # which are not translated in the desiredlang catalog). 8109 case "$desiredlang" in 8110 "$presentlang"*) useit=yes;; 8111 esac 8112 done 8113 if test $useit = yes; then 8114 INST_LINGUAS="$INST_LINGUAS $presentlang" 8115 fi 8116 done 8117 fi 8118 CATALOGS= 8119 JAVACATALOGS= 8120 QTCATALOGS= 8121 TCLCATALOGS= 8122 CSHARPCATALOGS= 8123 if test -n "$INST_LINGUAS"; then 8124 for lang in $INST_LINGUAS; do 8125 CATALOGS="$CATALOGS $lang.gmo" 8126 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" 8127 QTCATALOGS="$QTCATALOGS $lang.qm" 8128 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 8129 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" 8130 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 8131 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" 8132 done 8133 fi 8134 8135 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" 8136 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then 8137 # Add dependencies that cannot be formulated as a simple suffix rule. 8138 for lang in $ALL_LINGUAS; do 8139 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 8140 cat >> "$ac_file.tmp" <<EOF 8141$frobbedlang.msg: $lang.po 8142 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ 8143 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 8144EOF 8145 done 8146 fi 8147 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then 8148 # Add dependencies that cannot be formulated as a simple suffix rule. 8149 for lang in $ALL_LINGUAS; do 8150 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 8151 cat >> "$ac_file.tmp" <<EOF 8152$frobbedlang/\$(DOMAIN).resources.dll: $lang.po 8153 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ 8154 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 8155EOF 8156 done 8157 fi 8158 if test -n "$POMAKEFILEDEPS"; then 8159 cat >> "$ac_file.tmp" <<EOF 8160Makefile: $POMAKEFILEDEPS 8161EOF 8162 fi 8163 mv "$ac_file.tmp" "$ac_file" 8164]) 8165 8166# nls.m4 serial 2 (gettext-0.14.3) 8167dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc. 8168dnl This file is free software; the Free Software Foundation 8169dnl gives unlimited permission to copy and/or distribute it, 8170dnl with or without modifications, as long as this notice is preserved. 8171dnl 8172dnl This file can can be used in projects which are not available under 8173dnl the GNU General Public License or the GNU Library General Public 8174dnl License but which still want to provide support for the GNU gettext 8175dnl functionality. 8176dnl Please note that the actual code of the GNU gettext library is covered 8177dnl by the GNU Library General Public License, and the rest of the GNU 8178dnl gettext package package is covered by the GNU General Public License. 8179dnl They are *not* in the public domain. 8180 8181dnl Authors: 8182dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 8183dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 8184 8185AC_PREREQ(2.50) 8186 8187AC_DEFUN([AM_NLS], 8188[ 8189 AC_MSG_CHECKING([whether NLS is requested]) 8190 dnl Default is enabled NLS 8191 AC_ARG_ENABLE(nls, 8192 [ --disable-nls do not use Native Language Support], 8193 USE_NLS=$enableval, USE_NLS=yes) 8194 AC_MSG_RESULT($USE_NLS) 8195 AC_SUBST(USE_NLS) 8196]) 8197 8198AC_DEFUN([AM_MKINSTALLDIRS], 8199[ 8200 dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. 8201 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) 8202 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 8203 dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 8204 dnl Try to locate it. 8205 MKINSTALLDIRS= 8206 if test -n "$ac_aux_dir"; then 8207 case "$ac_aux_dir" in 8208 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; 8209 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; 8210 esac 8211 fi 8212 if test -z "$MKINSTALLDIRS"; then 8213 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 8214 fi 8215 AC_SUBST(MKINSTALLDIRS) 8216]) 8217 8218# progtest.m4 serial 4 (gettext-0.14.2) 8219dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. 8220dnl This file is free software; the Free Software Foundation 8221dnl gives unlimited permission to copy and/or distribute it, 8222dnl with or without modifications, as long as this notice is preserved. 8223dnl 8224dnl This file can can be used in projects which are not available under 8225dnl the GNU General Public License or the GNU Library General Public 8226dnl License but which still want to provide support for the GNU gettext 8227dnl functionality. 8228dnl Please note that the actual code of the GNU gettext library is covered 8229dnl by the GNU Library General Public License, and the rest of the GNU 8230dnl gettext package package is covered by the GNU General Public License. 8231dnl They are *not* in the public domain. 8232 8233dnl Authors: 8234dnl Ulrich Drepper <drepper@cygnus.com>, 1996. 8235 8236AC_PREREQ(2.50) 8237 8238# Search path for a program which passes the given test. 8239 8240dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 8241dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 8242AC_DEFUN([AM_PATH_PROG_WITH_TEST], 8243[ 8244# Prepare PATH_SEPARATOR. 8245# The user is always right. 8246if test "${PATH_SEPARATOR+set}" != set; then 8247 echo "#! /bin/sh" >conf$$.sh 8248 echo "exit 0" >>conf$$.sh 8249 chmod +x conf$$.sh 8250 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 8251 PATH_SEPARATOR=';' 8252 else 8253 PATH_SEPARATOR=: 8254 fi 8255 rm -f conf$$.sh 8256fi 8257 8258# Find out how to test for executable files. Don't use a zero-byte file, 8259# as systems may use methods other than mode bits to determine executability. 8260cat >conf$$.file <<_ASEOF 8261#! /bin/sh 8262exit 0 8263_ASEOF 8264chmod +x conf$$.file 8265if test -x conf$$.file >/dev/null 2>&1; then 8266 ac_executable_p="test -x" 8267else 8268 ac_executable_p="test -f" 8269fi 8270rm -f conf$$.file 8271 8272# Extract the first word of "$2", so it can be a program name with args. 8273set dummy $2; ac_word=[$]2 8274AC_MSG_CHECKING([for $ac_word]) 8275AC_CACHE_VAL(ac_cv_path_$1, 8276[case "[$]$1" in 8277 [[\\/]]* | ?:[[\\/]]*) 8278 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 8279 ;; 8280 *) 8281 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 8282 for ac_dir in ifelse([$5], , $PATH, [$5]); do 8283 IFS="$ac_save_IFS" 8284 test -z "$ac_dir" && ac_dir=. 8285 for ac_exec_ext in '' $ac_executable_extensions; do 8286 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 8287 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD 8288 if [$3]; then 8289 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 8290 break 2 8291 fi 8292 fi 8293 done 8294 done 8295 IFS="$ac_save_IFS" 8296dnl If no 4th arg is given, leave the cache variable unset, 8297dnl so AC_PATH_PROGS will keep looking. 8298ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 8299])dnl 8300 ;; 8301esac])dnl 8302$1="$ac_cv_path_$1" 8303if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 8304 AC_MSG_RESULT([$]$1) 8305else 8306 AC_MSG_RESULT(no) 8307fi 8308AC_SUBST($1)dnl 8309]) 8310 8311# lib-prefix.m4 serial 4 (gettext-0.14.2) 8312dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 8313dnl This file is free software; the Free Software Foundation 8314dnl gives unlimited permission to copy and/or distribute it, 8315dnl with or without modifications, as long as this notice is preserved. 8316 8317dnl From Bruno Haible. 8318 8319dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 8320dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 8321dnl require excessive bracketing. 8322ifdef([AC_HELP_STRING], 8323[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 8324[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 8325 8326dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 8327dnl to access previously installed libraries. The basic assumption is that 8328dnl a user will want packages to use other packages he previously installed 8329dnl with the same --prefix option. 8330dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 8331dnl libraries, but is otherwise very convenient. 8332AC_DEFUN([AC_LIB_PREFIX], 8333[ 8334 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 8335 AC_REQUIRE([AC_PROG_CC]) 8336 AC_REQUIRE([AC_CANONICAL_HOST]) 8337 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 8338 dnl By default, look in $includedir and $libdir. 8339 use_additional=yes 8340 AC_LIB_WITH_FINAL_PREFIX([ 8341 eval additional_includedir=\"$includedir\" 8342 eval additional_libdir=\"$libdir\" 8343 ]) 8344 AC_LIB_ARG_WITH([lib-prefix], 8345[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 8346 --without-lib-prefix don't search for libraries in includedir and libdir], 8347[ 8348 if test "X$withval" = "Xno"; then 8349 use_additional=no 8350 else 8351 if test "X$withval" = "X"; then 8352 AC_LIB_WITH_FINAL_PREFIX([ 8353 eval additional_includedir=\"$includedir\" 8354 eval additional_libdir=\"$libdir\" 8355 ]) 8356 else 8357 additional_includedir="$withval/include" 8358 additional_libdir="$withval/lib" 8359 fi 8360 fi 8361]) 8362 if test $use_additional = yes; then 8363 dnl Potentially add $additional_includedir to $CPPFLAGS. 8364 dnl But don't add it 8365 dnl 1. if it's the standard /usr/include, 8366 dnl 2. if it's already present in $CPPFLAGS, 8367 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 8368 dnl 4. if it doesn't exist as a directory. 8369 if test "X$additional_includedir" != "X/usr/include"; then 8370 haveit= 8371 for x in $CPPFLAGS; do 8372 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8373 if test "X$x" = "X-I$additional_includedir"; then 8374 haveit=yes 8375 break 8376 fi 8377 done 8378 if test -z "$haveit"; then 8379 if test "X$additional_includedir" = "X/usr/local/include"; then 8380 if test -n "$GCC"; then 8381 case $host_os in 8382 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 8383 esac 8384 fi 8385 fi 8386 if test -z "$haveit"; then 8387 if test -d "$additional_includedir"; then 8388 dnl Really add $additional_includedir to $CPPFLAGS. 8389 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 8390 fi 8391 fi 8392 fi 8393 fi 8394 dnl Potentially add $additional_libdir to $LDFLAGS. 8395 dnl But don't add it 8396 dnl 1. if it's the standard /usr/lib, 8397 dnl 2. if it's already present in $LDFLAGS, 8398 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 8399 dnl 4. if it doesn't exist as a directory. 8400 if test "X$additional_libdir" != "X/usr/lib"; then 8401 haveit= 8402 for x in $LDFLAGS; do 8403 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8404 if test "X$x" = "X-L$additional_libdir"; then 8405 haveit=yes 8406 break 8407 fi 8408 done 8409 if test -z "$haveit"; then 8410 if test "X$additional_libdir" = "X/usr/local/lib"; then 8411 if test -n "$GCC"; then 8412 case $host_os in 8413 linux*) haveit=yes;; 8414 esac 8415 fi 8416 fi 8417 if test -z "$haveit"; then 8418 if test -d "$additional_libdir"; then 8419 dnl Really add $additional_libdir to $LDFLAGS. 8420 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 8421 fi 8422 fi 8423 fi 8424 fi 8425 fi 8426]) 8427 8428dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 8429dnl acl_final_exec_prefix, containing the values to which $prefix and 8430dnl $exec_prefix will expand at the end of the configure script. 8431AC_DEFUN([AC_LIB_PREPARE_PREFIX], 8432[ 8433 dnl Unfortunately, prefix and exec_prefix get only finally determined 8434 dnl at the end of configure. 8435 if test "X$prefix" = "XNONE"; then 8436 acl_final_prefix="$ac_default_prefix" 8437 else 8438 acl_final_prefix="$prefix" 8439 fi 8440 if test "X$exec_prefix" = "XNONE"; then 8441 acl_final_exec_prefix='${prefix}' 8442 else 8443 acl_final_exec_prefix="$exec_prefix" 8444 fi 8445 acl_save_prefix="$prefix" 8446 prefix="$acl_final_prefix" 8447 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 8448 prefix="$acl_save_prefix" 8449]) 8450 8451dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 8452dnl variables prefix and exec_prefix bound to the values they will have 8453dnl at the end of the configure script. 8454AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 8455[ 8456 acl_save_prefix="$prefix" 8457 prefix="$acl_final_prefix" 8458 acl_save_exec_prefix="$exec_prefix" 8459 exec_prefix="$acl_final_exec_prefix" 8460 $1 8461 exec_prefix="$acl_save_exec_prefix" 8462 prefix="$acl_save_prefix" 8463]) 8464 8465# lib-link.m4 serial 6 (gettext-0.14.3) 8466dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 8467dnl This file is free software; the Free Software Foundation 8468dnl gives unlimited permission to copy and/or distribute it, 8469dnl with or without modifications, as long as this notice is preserved. 8470 8471dnl From Bruno Haible. 8472 8473AC_PREREQ(2.50) 8474 8475dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 8476dnl the libraries corresponding to explicit and implicit dependencies. 8477dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 8478dnl augments the CPPFLAGS variable. 8479AC_DEFUN([AC_LIB_LINKFLAGS], 8480[ 8481 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 8482 AC_REQUIRE([AC_LIB_RPATH]) 8483 define([Name],[translit([$1],[./-], [___])]) 8484 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 8485 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 8486 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 8487 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 8488 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 8489 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 8490 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 8491 ]) 8492 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 8493 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 8494 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 8495 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 8496 AC_SUBST([LIB]NAME) 8497 AC_SUBST([LTLIB]NAME) 8498 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 8499 dnl results of this search when this library appears as a dependency. 8500 HAVE_LIB[]NAME=yes 8501 undefine([Name]) 8502 undefine([NAME]) 8503]) 8504 8505dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 8506dnl searches for libname and the libraries corresponding to explicit and 8507dnl implicit dependencies, together with the specified include files and 8508dnl the ability to compile and link the specified testcode. If found, it 8509dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 8510dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 8511dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 8512dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 8513AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 8514[ 8515 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 8516 AC_REQUIRE([AC_LIB_RPATH]) 8517 define([Name],[translit([$1],[./-], [___])]) 8518 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 8519 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 8520 8521 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 8522 dnl accordingly. 8523 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 8524 8525 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 8526 dnl because if the user has installed lib[]Name and not disabled its use 8527 dnl via --without-lib[]Name-prefix, he wants to use it. 8528 ac_save_CPPFLAGS="$CPPFLAGS" 8529 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 8530 8531 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 8532 ac_save_LIBS="$LIBS" 8533 LIBS="$LIBS $LIB[]NAME" 8534 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 8535 LIBS="$ac_save_LIBS" 8536 ]) 8537 if test "$ac_cv_lib[]Name" = yes; then 8538 HAVE_LIB[]NAME=yes 8539 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 8540 AC_MSG_CHECKING([how to link with lib[]$1]) 8541 AC_MSG_RESULT([$LIB[]NAME]) 8542 else 8543 HAVE_LIB[]NAME=no 8544 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 8545 dnl $INC[]NAME either. 8546 CPPFLAGS="$ac_save_CPPFLAGS" 8547 LIB[]NAME= 8548 LTLIB[]NAME= 8549 fi 8550 AC_SUBST([HAVE_LIB]NAME) 8551 AC_SUBST([LIB]NAME) 8552 AC_SUBST([LTLIB]NAME) 8553 undefine([Name]) 8554 undefine([NAME]) 8555]) 8556 8557dnl Determine the platform dependent parameters needed to use rpath: 8558dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 8559dnl hardcode_direct, hardcode_minus_L. 8560AC_DEFUN([AC_LIB_RPATH], 8561[ 8562 dnl Tell automake >= 1.10 to complain if config.rpath is missing. 8563 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) 8564 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 8565 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 8566 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 8567 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 8568 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 8569 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 8570 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 8571 . ./conftest.sh 8572 rm -f ./conftest.sh 8573 acl_cv_rpath=done 8574 ]) 8575 wl="$acl_cv_wl" 8576 libext="$acl_cv_libext" 8577 shlibext="$acl_cv_shlibext" 8578 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 8579 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 8580 hardcode_direct="$acl_cv_hardcode_direct" 8581 hardcode_minus_L="$acl_cv_hardcode_minus_L" 8582 dnl Determine whether the user wants rpath handling at all. 8583 AC_ARG_ENABLE(rpath, 8584 [ --disable-rpath do not hardcode runtime library paths], 8585 :, enable_rpath=yes) 8586]) 8587 8588dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 8589dnl the libraries corresponding to explicit and implicit dependencies. 8590dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 8591AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 8592[ 8593 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 8594 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 8595 dnl By default, look in $includedir and $libdir. 8596 use_additional=yes 8597 AC_LIB_WITH_FINAL_PREFIX([ 8598 eval additional_includedir=\"$includedir\" 8599 eval additional_libdir=\"$libdir\" 8600 ]) 8601 AC_LIB_ARG_WITH([lib$1-prefix], 8602[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 8603 --without-lib$1-prefix don't search for lib$1 in includedir and libdir], 8604[ 8605 if test "X$withval" = "Xno"; then 8606 use_additional=no 8607 else 8608 if test "X$withval" = "X"; then 8609 AC_LIB_WITH_FINAL_PREFIX([ 8610 eval additional_includedir=\"$includedir\" 8611 eval additional_libdir=\"$libdir\" 8612 ]) 8613 else 8614 additional_includedir="$withval/include" 8615 additional_libdir="$withval/lib" 8616 fi 8617 fi 8618]) 8619 dnl Search the library and its dependencies in $additional_libdir and 8620 dnl $LDFLAGS. Using breadth-first-seach. 8621 LIB[]NAME= 8622 LTLIB[]NAME= 8623 INC[]NAME= 8624 rpathdirs= 8625 ltrpathdirs= 8626 names_already_handled= 8627 names_next_round='$1 $2' 8628 while test -n "$names_next_round"; do 8629 names_this_round="$names_next_round" 8630 names_next_round= 8631 for name in $names_this_round; do 8632 already_handled= 8633 for n in $names_already_handled; do 8634 if test "$n" = "$name"; then 8635 already_handled=yes 8636 break 8637 fi 8638 done 8639 if test -z "$already_handled"; then 8640 names_already_handled="$names_already_handled $name" 8641 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 8642 dnl or AC_LIB_HAVE_LINKFLAGS call. 8643 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 8644 eval value=\"\$HAVE_LIB$uppername\" 8645 if test -n "$value"; then 8646 if test "$value" = yes; then 8647 eval value=\"\$LIB$uppername\" 8648 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 8649 eval value=\"\$LTLIB$uppername\" 8650 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 8651 else 8652 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 8653 dnl that this library doesn't exist. So just drop it. 8654 : 8655 fi 8656 else 8657 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 8658 dnl and the already constructed $LIBNAME/$LTLIBNAME. 8659 found_dir= 8660 found_la= 8661 found_so= 8662 found_a= 8663 if test $use_additional = yes; then 8664 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then 8665 found_dir="$additional_libdir" 8666 found_so="$additional_libdir/lib$name.$shlibext" 8667 if test -f "$additional_libdir/lib$name.la"; then 8668 found_la="$additional_libdir/lib$name.la" 8669 fi 8670 else 8671 if test -f "$additional_libdir/lib$name.$libext"; then 8672 found_dir="$additional_libdir" 8673 found_a="$additional_libdir/lib$name.$libext" 8674 if test -f "$additional_libdir/lib$name.la"; then 8675 found_la="$additional_libdir/lib$name.la" 8676 fi 8677 fi 8678 fi 8679 fi 8680 if test "X$found_dir" = "X"; then 8681 for x in $LDFLAGS $LTLIB[]NAME; do 8682 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8683 case "$x" in 8684 -L*) 8685 dir=`echo "X$x" | sed -e 's/^X-L//'` 8686 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then 8687 found_dir="$dir" 8688 found_so="$dir/lib$name.$shlibext" 8689 if test -f "$dir/lib$name.la"; then 8690 found_la="$dir/lib$name.la" 8691 fi 8692 else 8693 if test -f "$dir/lib$name.$libext"; then 8694 found_dir="$dir" 8695 found_a="$dir/lib$name.$libext" 8696 if test -f "$dir/lib$name.la"; then 8697 found_la="$dir/lib$name.la" 8698 fi 8699 fi 8700 fi 8701 ;; 8702 esac 8703 if test "X$found_dir" != "X"; then 8704 break 8705 fi 8706 done 8707 fi 8708 if test "X$found_dir" != "X"; then 8709 dnl Found the library. 8710 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 8711 if test "X$found_so" != "X"; then 8712 dnl Linking with a shared library. We attempt to hardcode its 8713 dnl directory into the executable's runpath, unless it's the 8714 dnl standard /usr/lib. 8715 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 8716 dnl No hardcoding is needed. 8717 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 8718 else 8719 dnl Use an explicit option to hardcode DIR into the resulting 8720 dnl binary. 8721 dnl Potentially add DIR to ltrpathdirs. 8722 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 8723 haveit= 8724 for x in $ltrpathdirs; do 8725 if test "X$x" = "X$found_dir"; then 8726 haveit=yes 8727 break 8728 fi 8729 done 8730 if test -z "$haveit"; then 8731 ltrpathdirs="$ltrpathdirs $found_dir" 8732 fi 8733 dnl The hardcoding into $LIBNAME is system dependent. 8734 if test "$hardcode_direct" = yes; then 8735 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 8736 dnl resulting binary. 8737 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 8738 else 8739 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 8740 dnl Use an explicit option to hardcode DIR into the resulting 8741 dnl binary. 8742 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 8743 dnl Potentially add DIR to rpathdirs. 8744 dnl The rpathdirs will be appended to $LIBNAME at the end. 8745 haveit= 8746 for x in $rpathdirs; do 8747 if test "X$x" = "X$found_dir"; then 8748 haveit=yes 8749 break 8750 fi 8751 done 8752 if test -z "$haveit"; then 8753 rpathdirs="$rpathdirs $found_dir" 8754 fi 8755 else 8756 dnl Rely on "-L$found_dir". 8757 dnl But don't add it if it's already contained in the LDFLAGS 8758 dnl or the already constructed $LIBNAME 8759 haveit= 8760 for x in $LDFLAGS $LIB[]NAME; do 8761 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8762 if test "X$x" = "X-L$found_dir"; then 8763 haveit=yes 8764 break 8765 fi 8766 done 8767 if test -z "$haveit"; then 8768 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 8769 fi 8770 if test "$hardcode_minus_L" != no; then 8771 dnl FIXME: Not sure whether we should use 8772 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 8773 dnl here. 8774 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 8775 else 8776 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 8777 dnl here, because this doesn't fit in flags passed to the 8778 dnl compiler. So give up. No hardcoding. This affects only 8779 dnl very old systems. 8780 dnl FIXME: Not sure whether we should use 8781 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 8782 dnl here. 8783 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 8784 fi 8785 fi 8786 fi 8787 fi 8788 else 8789 if test "X$found_a" != "X"; then 8790 dnl Linking with a static library. 8791 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 8792 else 8793 dnl We shouldn't come here, but anyway it's good to have a 8794 dnl fallback. 8795 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 8796 fi 8797 fi 8798 dnl Assume the include files are nearby. 8799 additional_includedir= 8800 case "$found_dir" in 8801 */lib | */lib/) 8802 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 8803 additional_includedir="$basedir/include" 8804 ;; 8805 esac 8806 if test "X$additional_includedir" != "X"; then 8807 dnl Potentially add $additional_includedir to $INCNAME. 8808 dnl But don't add it 8809 dnl 1. if it's the standard /usr/include, 8810 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 8811 dnl 3. if it's already present in $CPPFLAGS or the already 8812 dnl constructed $INCNAME, 8813 dnl 4. if it doesn't exist as a directory. 8814 if test "X$additional_includedir" != "X/usr/include"; then 8815 haveit= 8816 if test "X$additional_includedir" = "X/usr/local/include"; then 8817 if test -n "$GCC"; then 8818 case $host_os in 8819 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 8820 esac 8821 fi 8822 fi 8823 if test -z "$haveit"; then 8824 for x in $CPPFLAGS $INC[]NAME; do 8825 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8826 if test "X$x" = "X-I$additional_includedir"; then 8827 haveit=yes 8828 break 8829 fi 8830 done 8831 if test -z "$haveit"; then 8832 if test -d "$additional_includedir"; then 8833 dnl Really add $additional_includedir to $INCNAME. 8834 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 8835 fi 8836 fi 8837 fi 8838 fi 8839 fi 8840 dnl Look for dependencies. 8841 if test -n "$found_la"; then 8842 dnl Read the .la file. It defines the variables 8843 dnl dlname, library_names, old_library, dependency_libs, current, 8844 dnl age, revision, installed, dlopen, dlpreopen, libdir. 8845 save_libdir="$libdir" 8846 case "$found_la" in 8847 */* | *\\*) . "$found_la" ;; 8848 *) . "./$found_la" ;; 8849 esac 8850 libdir="$save_libdir" 8851 dnl We use only dependency_libs. 8852 for dep in $dependency_libs; do 8853 case "$dep" in 8854 -L*) 8855 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 8856 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 8857 dnl But don't add it 8858 dnl 1. if it's the standard /usr/lib, 8859 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 8860 dnl 3. if it's already present in $LDFLAGS or the already 8861 dnl constructed $LIBNAME, 8862 dnl 4. if it doesn't exist as a directory. 8863 if test "X$additional_libdir" != "X/usr/lib"; then 8864 haveit= 8865 if test "X$additional_libdir" = "X/usr/local/lib"; then 8866 if test -n "$GCC"; then 8867 case $host_os in 8868 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 8869 esac 8870 fi 8871 fi 8872 if test -z "$haveit"; then 8873 haveit= 8874 for x in $LDFLAGS $LIB[]NAME; do 8875 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8876 if test "X$x" = "X-L$additional_libdir"; then 8877 haveit=yes 8878 break 8879 fi 8880 done 8881 if test -z "$haveit"; then 8882 if test -d "$additional_libdir"; then 8883 dnl Really add $additional_libdir to $LIBNAME. 8884 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 8885 fi 8886 fi 8887 haveit= 8888 for x in $LDFLAGS $LTLIB[]NAME; do 8889 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 8890 if test "X$x" = "X-L$additional_libdir"; then 8891 haveit=yes 8892 break 8893 fi 8894 done 8895 if test -z "$haveit"; then 8896 if test -d "$additional_libdir"; then 8897 dnl Really add $additional_libdir to $LTLIBNAME. 8898 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 8899 fi 8900 fi 8901 fi 8902 fi 8903 ;; 8904 -R*) 8905 dir=`echo "X$dep" | sed -e 's/^X-R//'` 8906 if test "$enable_rpath" != no; then 8907 dnl Potentially add DIR to rpathdirs. 8908 dnl The rpathdirs will be appended to $LIBNAME at the end. 8909 haveit= 8910 for x in $rpathdirs; do 8911 if test "X$x" = "X$dir"; then 8912 haveit=yes 8913 break 8914 fi 8915 done 8916 if test -z "$haveit"; then 8917 rpathdirs="$rpathdirs $dir" 8918 fi 8919 dnl Potentially add DIR to ltrpathdirs. 8920 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 8921 haveit= 8922 for x in $ltrpathdirs; do 8923 if test "X$x" = "X$dir"; then 8924 haveit=yes 8925 break 8926 fi 8927 done 8928 if test -z "$haveit"; then 8929 ltrpathdirs="$ltrpathdirs $dir" 8930 fi 8931 fi 8932 ;; 8933 -l*) 8934 dnl Handle this in the next round. 8935 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 8936 ;; 8937 *.la) 8938 dnl Handle this in the next round. Throw away the .la's 8939 dnl directory; it is already contained in a preceding -L 8940 dnl option. 8941 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 8942 ;; 8943 *) 8944 dnl Most likely an immediate library name. 8945 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 8946 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 8947 ;; 8948 esac 8949 done 8950 fi 8951 else 8952 dnl Didn't find the library; assume it is in the system directories 8953 dnl known to the linker and runtime loader. (All the system 8954 dnl directories known to the linker should also be known to the 8955 dnl runtime loader, otherwise the system is severely misconfigured.) 8956 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 8957 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 8958 fi 8959 fi 8960 fi 8961 done 8962 done 8963 if test "X$rpathdirs" != "X"; then 8964 if test -n "$hardcode_libdir_separator"; then 8965 dnl Weird platform: only the last -rpath option counts, the user must 8966 dnl pass all path elements in one option. We can arrange that for a 8967 dnl single library, but not when more than one $LIBNAMEs are used. 8968 alldirs= 8969 for found_dir in $rpathdirs; do 8970 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 8971 done 8972 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 8973 acl_save_libdir="$libdir" 8974 libdir="$alldirs" 8975 eval flag=\"$hardcode_libdir_flag_spec\" 8976 libdir="$acl_save_libdir" 8977 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 8978 else 8979 dnl The -rpath options are cumulative. 8980 for found_dir in $rpathdirs; do 8981 acl_save_libdir="$libdir" 8982 libdir="$found_dir" 8983 eval flag=\"$hardcode_libdir_flag_spec\" 8984 libdir="$acl_save_libdir" 8985 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 8986 done 8987 fi 8988 fi 8989 if test "X$ltrpathdirs" != "X"; then 8990 dnl When using libtool, the option that works for both libraries and 8991 dnl executables is -R. The -R options are cumulative. 8992 for found_dir in $ltrpathdirs; do 8993 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 8994 done 8995 fi 8996]) 8997 8998dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 8999dnl unless already present in VAR. 9000dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 9001dnl contains two or three consecutive elements that belong together. 9002AC_DEFUN([AC_LIB_APPENDTOVAR], 9003[ 9004 for element in [$2]; do 9005 haveit= 9006 for x in $[$1]; do 9007 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 9008 if test "X$x" = "X$element"; then 9009 haveit=yes 9010 break 9011 fi 9012 done 9013 if test -z "$haveit"; then 9014 [$1]="${[$1]}${[$1]:+ }$element" 9015 fi 9016 done 9017]) 9018 9019# lib-ld.m4 serial 3 (gettext-0.13) 9020dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 9021dnl This file is free software; the Free Software Foundation 9022dnl gives unlimited permission to copy and/or distribute it, 9023dnl with or without modifications, as long as this notice is preserved. 9024 9025dnl Subroutines of libtool.m4, 9026dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 9027dnl with libtool.m4. 9028 9029dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 9030AC_DEFUN([AC_LIB_PROG_LD_GNU], 9031[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 9032[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 9033case `$LD -v 2>&1 </dev/null` in 9034*GNU* | *'with BFD'*) 9035 acl_cv_prog_gnu_ld=yes ;; 9036*) 9037 acl_cv_prog_gnu_ld=no ;; 9038esac]) 9039with_gnu_ld=$acl_cv_prog_gnu_ld 9040]) 9041 9042dnl From libtool-1.4. Sets the variable LD. 9043AC_DEFUN([AC_LIB_PROG_LD], 9044[AC_ARG_WITH(gnu-ld, 9045[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 9046test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 9047AC_REQUIRE([AC_PROG_CC])dnl 9048AC_REQUIRE([AC_CANONICAL_HOST])dnl 9049# Prepare PATH_SEPARATOR. 9050# The user is always right. 9051if test "${PATH_SEPARATOR+set}" != set; then 9052 echo "#! /bin/sh" >conf$$.sh 9053 echo "exit 0" >>conf$$.sh 9054 chmod +x conf$$.sh 9055 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 9056 PATH_SEPARATOR=';' 9057 else 9058 PATH_SEPARATOR=: 9059 fi 9060 rm -f conf$$.sh 9061fi 9062ac_prog=ld 9063if test "$GCC" = yes; then 9064 # Check if gcc -print-prog-name=ld gives a path. 9065 AC_MSG_CHECKING([for ld used by GCC]) 9066 case $host in 9067 *-*-mingw*) 9068 # gcc leaves a trailing carriage return which upsets mingw 9069 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 9070 *) 9071 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 9072 esac 9073 case $ac_prog in 9074 # Accept absolute paths. 9075 [[\\/]* | [A-Za-z]:[\\/]*)] 9076 [re_direlt='/[^/][^/]*/\.\./'] 9077 # Canonicalize the path of ld 9078 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 9079 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 9080 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 9081 done 9082 test -z "$LD" && LD="$ac_prog" 9083 ;; 9084 "") 9085 # If it fails, then pretend we aren't using GCC. 9086 ac_prog=ld 9087 ;; 9088 *) 9089 # If it is relative, then search for the first ld in PATH. 9090 with_gnu_ld=unknown 9091 ;; 9092 esac 9093elif test "$with_gnu_ld" = yes; then 9094 AC_MSG_CHECKING([for GNU ld]) 9095else 9096 AC_MSG_CHECKING([for non-GNU ld]) 9097fi 9098AC_CACHE_VAL(acl_cv_path_LD, 9099[if test -z "$LD"; then 9100 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 9101 for ac_dir in $PATH; do 9102 test -z "$ac_dir" && ac_dir=. 9103 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 9104 acl_cv_path_LD="$ac_dir/$ac_prog" 9105 # Check to see if the program is GNU ld. I'd rather use --version, 9106 # but apparently some GNU ld's only accept -v. 9107 # Break only if it was the GNU/non-GNU ld that we prefer. 9108 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 9109 *GNU* | *'with BFD'*) 9110 test "$with_gnu_ld" != no && break ;; 9111 *) 9112 test "$with_gnu_ld" != yes && break ;; 9113 esac 9114 fi 9115 done 9116 IFS="$ac_save_ifs" 9117else 9118 acl_cv_path_LD="$LD" # Let the user override the test with a path. 9119fi]) 9120LD="$acl_cv_path_LD" 9121if test -n "$LD"; then 9122 AC_MSG_RESULT($LD) 9123else 9124 AC_MSG_RESULT(no) 9125fi 9126test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 9127AC_LIB_PROG_LD_GNU 9128]) 9129 9130# iconv.m4 serial AM4 (gettext-0.11.3) 9131dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 9132dnl This file is free software; the Free Software Foundation 9133dnl gives unlimited permission to copy and/or distribute it, 9134dnl with or without modifications, as long as this notice is preserved. 9135 9136dnl From Bruno Haible. 9137 9138AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 9139[ 9140 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 9141 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 9142 AC_REQUIRE([AC_LIB_RPATH]) 9143 9144 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 9145 dnl accordingly. 9146 AC_LIB_LINKFLAGS_BODY([iconv]) 9147]) 9148 9149AC_DEFUN([AM_ICONV_LINK], 9150[ 9151 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 9152 dnl those with the standalone portable GNU libiconv installed). 9153 9154 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 9155 dnl accordingly. 9156 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 9157 9158 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 9159 dnl because if the user has installed libiconv and not disabled its use 9160 dnl via --without-libiconv-prefix, he wants to use it. The first 9161 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 9162 am_save_CPPFLAGS="$CPPFLAGS" 9163 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 9164 9165 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 9166 am_cv_func_iconv="no, consider installing GNU libiconv" 9167 am_cv_lib_iconv=no 9168 AC_TRY_LINK([#include <stdlib.h> 9169#include <iconv.h>], 9170 [iconv_t cd = iconv_open("",""); 9171 iconv(cd,NULL,NULL,NULL,NULL); 9172 iconv_close(cd);], 9173 am_cv_func_iconv=yes) 9174 if test "$am_cv_func_iconv" != yes; then 9175 am_save_LIBS="$LIBS" 9176 LIBS="$LIBS $LIBICONV" 9177 AC_TRY_LINK([#include <stdlib.h> 9178#include <iconv.h>], 9179 [iconv_t cd = iconv_open("",""); 9180 iconv(cd,NULL,NULL,NULL,NULL); 9181 iconv_close(cd);], 9182 am_cv_lib_iconv=yes 9183 am_cv_func_iconv=yes) 9184 LIBS="$am_save_LIBS" 9185 fi 9186 ]) 9187 if test "$am_cv_func_iconv" = yes; then 9188 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 9189 fi 9190 if test "$am_cv_lib_iconv" = yes; then 9191 AC_MSG_CHECKING([how to link with libiconv]) 9192 AC_MSG_RESULT([$LIBICONV]) 9193 else 9194 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 9195 dnl either. 9196 CPPFLAGS="$am_save_CPPFLAGS" 9197 LIBICONV= 9198 LTLIBICONV= 9199 fi 9200 AC_SUBST(LIBICONV) 9201 AC_SUBST(LTLIBICONV) 9202]) 9203 9204AC_DEFUN([AM_ICONV], 9205[ 9206 AM_ICONV_LINK 9207 if test "$am_cv_func_iconv" = yes; then 9208 AC_MSG_CHECKING([for iconv declaration]) 9209 AC_CACHE_VAL(am_cv_proto_iconv, [ 9210 AC_TRY_COMPILE([ 9211#include <stdlib.h> 9212#include <iconv.h> 9213extern 9214#ifdef __cplusplus 9215"C" 9216#endif 9217#if defined(__STDC__) || defined(__cplusplus) 9218size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 9219#else 9220size_t iconv(); 9221#endif 9222], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 9223 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 9224 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 9225 AC_MSG_RESULT([$]{ac_t:- 9226 }[$]am_cv_proto_iconv) 9227 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 9228 [Define as const if the declaration of iconv() needs const.]) 9229 fi 9230]) 9231 9232# glibc2.m4 serial 1 9233dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. 9234dnl This file is free software; the Free Software Foundation 9235dnl gives unlimited permission to copy and/or distribute it, 9236dnl with or without modifications, as long as this notice is preserved. 9237 9238# Test for the GNU C Library, version 2.0 or newer. 9239# From Bruno Haible. 9240 9241AC_DEFUN([gt_GLIBC2], 9242 [ 9243 AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, 9244 ac_cv_gnu_library_2, 9245 [AC_EGREP_CPP([Lucky GNU user], 9246 [ 9247#include <features.h> 9248#ifdef __GNU_LIBRARY__ 9249 #if (__GLIBC__ >= 2) 9250 Lucky GNU user 9251 #endif 9252#endif 9253 ], 9254 ac_cv_gnu_library_2=yes, 9255 ac_cv_gnu_library_2=no) 9256 ] 9257 ) 9258 AC_SUBST(GLIBC2) 9259 GLIBC2="$ac_cv_gnu_library_2" 9260 ] 9261) 9262 9263# isc-posix.m4 serial 2 (gettext-0.11.2) 9264dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 9265dnl This file is free software; the Free Software Foundation 9266dnl gives unlimited permission to copy and/or distribute it, 9267dnl with or without modifications, as long as this notice is preserved. 9268 9269# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. 9270 9271# This test replaces the one in autoconf. 9272# Currently this macro should have the same name as the autoconf macro 9273# because gettext's gettext.m4 (distributed in the automake package) 9274# still uses it. Otherwise, the use in gettext.m4 makes autoheader 9275# give these diagnostics: 9276# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX 9277# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX 9278 9279undefine([AC_ISC_POSIX]) 9280 9281AC_DEFUN([AC_ISC_POSIX], 9282 [ 9283 dnl This test replaces the obsolescent AC_ISC_POSIX kludge. 9284 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) 9285 ] 9286) 9287 9288# signed.m4 serial 1 (gettext-0.10.40) 9289dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. 9290dnl This file is free software; the Free Software Foundation 9291dnl gives unlimited permission to copy and/or distribute it, 9292dnl with or without modifications, as long as this notice is preserved. 9293 9294dnl From Bruno Haible. 9295 9296AC_DEFUN([bh_C_SIGNED], 9297[ 9298 AC_CACHE_CHECK([for signed], bh_cv_c_signed, 9299 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) 9300 if test $bh_cv_c_signed = no; then 9301 AC_DEFINE(signed, , 9302 [Define to empty if the C compiler doesn't support this keyword.]) 9303 fi 9304]) 9305 9306# longlong.m4 serial 5 9307dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. 9308dnl This file is free software; the Free Software Foundation 9309dnl gives unlimited permission to copy and/or distribute it, 9310dnl with or without modifications, as long as this notice is preserved. 9311 9312dnl From Paul Eggert. 9313 9314# Define HAVE_LONG_LONG if 'long long' works. 9315 9316AC_DEFUN([gl_AC_TYPE_LONG_LONG], 9317[ 9318 AC_CACHE_CHECK([for long long], ac_cv_type_long_long, 9319 [AC_TRY_LINK([long long ll = 1LL; int i = 63;], 9320 [long long llmax = (long long) -1; 9321 return ll << i | ll >> i | llmax / ll | llmax % ll;], 9322 ac_cv_type_long_long=yes, 9323 ac_cv_type_long_long=no)]) 9324 if test $ac_cv_type_long_long = yes; then 9325 AC_DEFINE(HAVE_LONG_LONG, 1, 9326 [Define if you have the 'long long' type.]) 9327 fi 9328]) 9329 9330# longdouble.m4 serial 1 (gettext-0.12) 9331dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. 9332dnl This file is free software; the Free Software Foundation 9333dnl gives unlimited permission to copy and/or distribute it, 9334dnl with or without modifications, as long as this notice is preserved. 9335 9336dnl From Bruno Haible. 9337dnl Test whether the compiler supports the 'long double' type. 9338dnl Prerequisite: AC_PROG_CC 9339 9340AC_DEFUN([gt_TYPE_LONGDOUBLE], 9341[ 9342 AC_CACHE_CHECK([for long double], gt_cv_c_long_double, 9343 [if test "$GCC" = yes; then 9344 gt_cv_c_long_double=yes 9345 else 9346 AC_TRY_COMPILE([ 9347 /* The Stardent Vistra knows sizeof(long double), but does not support it. */ 9348 long double foo = 0.0; 9349 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ 9350 int array [2*(sizeof(long double) >= sizeof(double)) - 1]; 9351 ], , 9352 gt_cv_c_long_double=yes, gt_cv_c_long_double=no) 9353 fi]) 9354 if test $gt_cv_c_long_double = yes; then 9355 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) 9356 fi 9357]) 9358 9359# wchar_t.m4 serial 1 (gettext-0.12) 9360dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. 9361dnl This file is free software; the Free Software Foundation 9362dnl gives unlimited permission to copy and/or distribute it, 9363dnl with or without modifications, as long as this notice is preserved. 9364 9365dnl From Bruno Haible. 9366dnl Test whether <stddef.h> has the 'wchar_t' type. 9367dnl Prerequisite: AC_PROG_CC 9368 9369AC_DEFUN([gt_TYPE_WCHAR_T], 9370[ 9371 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, 9372 [AC_TRY_COMPILE([#include <stddef.h> 9373 wchar_t foo = (wchar_t)'\0';], , 9374 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) 9375 if test $gt_cv_c_wchar_t = yes; then 9376 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) 9377 fi 9378]) 9379 9380# wint_t.m4 serial 1 (gettext-0.12) 9381dnl Copyright (C) 2003 Free Software Foundation, Inc. 9382dnl This file is free software; the Free Software Foundation 9383dnl gives unlimited permission to copy and/or distribute it, 9384dnl with or without modifications, as long as this notice is preserved. 9385 9386dnl From Bruno Haible. 9387dnl Test whether <wchar.h> has the 'wint_t' type. 9388dnl Prerequisite: AC_PROG_CC 9389 9390AC_DEFUN([gt_TYPE_WINT_T], 9391[ 9392 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, 9393 [AC_TRY_COMPILE([#include <wchar.h> 9394 wint_t foo = (wchar_t)'\0';], , 9395 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) 9396 if test $gt_cv_c_wint_t = yes; then 9397 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) 9398 fi 9399]) 9400 9401# inttypes_h.m4 serial 6 9402dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 9403dnl This file is free software; the Free Software Foundation 9404dnl gives unlimited permission to copy and/or distribute it, 9405dnl with or without modifications, as long as this notice is preserved. 9406 9407dnl From Paul Eggert. 9408 9409# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, 9410# doesn't clash with <sys/types.h>, and declares uintmax_t. 9411 9412AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 9413[ 9414 AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, 9415 [AC_TRY_COMPILE( 9416 [#include <sys/types.h> 9417#include <inttypes.h>], 9418 [uintmax_t i = (uintmax_t) -1;], 9419 gl_cv_header_inttypes_h=yes, 9420 gl_cv_header_inttypes_h=no)]) 9421 if test $gl_cv_header_inttypes_h = yes; then 9422 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, 9423 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, 9424 and declares uintmax_t. ]) 9425 fi 9426]) 9427 9428# stdint_h.m4 serial 5 9429dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 9430dnl This file is free software; the Free Software Foundation 9431dnl gives unlimited permission to copy and/or distribute it, 9432dnl with or without modifications, as long as this notice is preserved. 9433 9434dnl From Paul Eggert. 9435 9436# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, 9437# doesn't clash with <sys/types.h>, and declares uintmax_t. 9438 9439AC_DEFUN([gl_AC_HEADER_STDINT_H], 9440[ 9441 AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, 9442 [AC_TRY_COMPILE( 9443 [#include <sys/types.h> 9444#include <stdint.h>], 9445 [uintmax_t i = (uintmax_t) -1;], 9446 gl_cv_header_stdint_h=yes, 9447 gl_cv_header_stdint_h=no)]) 9448 if test $gl_cv_header_stdint_h = yes; then 9449 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, 9450 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, 9451 and declares uintmax_t. ]) 9452 fi 9453]) 9454 9455# intmax.m4 serial 2 (gettext-0.14.2) 9456dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. 9457dnl This file is free software; the Free Software Foundation 9458dnl gives unlimited permission to copy and/or distribute it, 9459dnl with or without modifications, as long as this notice is preserved. 9460 9461dnl From Bruno Haible. 9462dnl Test whether the system has the 'intmax_t' type, but don't attempt to 9463dnl find a replacement if it is lacking. 9464 9465AC_DEFUN([gt_TYPE_INTMAX_T], 9466[ 9467 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 9468 AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 9469 AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, 9470 [AC_TRY_COMPILE([ 9471#include <stddef.h> 9472#include <stdlib.h> 9473#if HAVE_STDINT_H_WITH_UINTMAX 9474#include <stdint.h> 9475#endif 9476#if HAVE_INTTYPES_H_WITH_UINTMAX 9477#include <inttypes.h> 9478#endif 9479], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) 9480 if test $gt_cv_c_intmax_t = yes; then 9481 AC_DEFINE(HAVE_INTMAX_T, 1, 9482 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) 9483 fi 9484]) 9485 9486# printf-posix.m4 serial 2 (gettext-0.13.1) 9487dnl Copyright (C) 2003 Free Software Foundation, Inc. 9488dnl This file is free software; the Free Software Foundation 9489dnl gives unlimited permission to copy and/or distribute it, 9490dnl with or without modifications, as long as this notice is preserved. 9491 9492dnl From Bruno Haible. 9493dnl Test whether the printf() function supports POSIX/XSI format strings with 9494dnl positions. 9495 9496AC_DEFUN([gt_PRINTF_POSIX], 9497[ 9498 AC_REQUIRE([AC_PROG_CC]) 9499 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], 9500 gt_cv_func_printf_posix, 9501 [ 9502 AC_TRY_RUN([ 9503#include <stdio.h> 9504#include <string.h> 9505/* The string "%2$d %1$d", with dollar characters protected from the shell's 9506 dollar expansion (possibly an autoconf bug). */ 9507static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 9508static char buf[100]; 9509int main () 9510{ 9511 sprintf (buf, format, 33, 55); 9512 return (strcmp (buf, "55 33") != 0); 9513}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, 9514 [ 9515 AC_EGREP_CPP(notposix, [ 9516#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 9517 notposix 9518#endif 9519 ], gt_cv_func_printf_posix="guessing no", 9520 gt_cv_func_printf_posix="guessing yes") 9521 ]) 9522 ]) 9523 case $gt_cv_func_printf_posix in 9524 *yes) 9525 AC_DEFINE(HAVE_POSIX_PRINTF, 1, 9526 [Define if your printf() function supports format strings with positions.]) 9527 ;; 9528 esac 9529]) 9530 9531# glibc21.m4 serial 3 9532dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. 9533dnl This file is free software; the Free Software Foundation 9534dnl gives unlimited permission to copy and/or distribute it, 9535dnl with or without modifications, as long as this notice is preserved. 9536 9537# Test for the GNU C Library, version 2.1 or newer. 9538# From Bruno Haible. 9539 9540AC_DEFUN([gl_GLIBC21], 9541 [ 9542 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 9543 ac_cv_gnu_library_2_1, 9544 [AC_EGREP_CPP([Lucky GNU user], 9545 [ 9546#include <features.h> 9547#ifdef __GNU_LIBRARY__ 9548 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 9549 Lucky GNU user 9550 #endif 9551#endif 9552 ], 9553 ac_cv_gnu_library_2_1=yes, 9554 ac_cv_gnu_library_2_1=no) 9555 ] 9556 ) 9557 AC_SUBST(GLIBC21) 9558 GLIBC21="$ac_cv_gnu_library_2_1" 9559 ] 9560) 9561 9562# intdiv0.m4 serial 1 (gettext-0.11.3) 9563dnl Copyright (C) 2002 Free Software Foundation, Inc. 9564dnl This file is free software; the Free Software Foundation 9565dnl gives unlimited permission to copy and/or distribute it, 9566dnl with or without modifications, as long as this notice is preserved. 9567 9568dnl From Bruno Haible. 9569 9570AC_DEFUN([gt_INTDIV0], 9571[ 9572 AC_REQUIRE([AC_PROG_CC])dnl 9573 AC_REQUIRE([AC_CANONICAL_HOST])dnl 9574 9575 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], 9576 gt_cv_int_divbyzero_sigfpe, 9577 [ 9578 AC_TRY_RUN([ 9579#include <stdlib.h> 9580#include <signal.h> 9581 9582static void 9583#ifdef __cplusplus 9584sigfpe_handler (int sig) 9585#else 9586sigfpe_handler (sig) int sig; 9587#endif 9588{ 9589 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ 9590 exit (sig != SIGFPE); 9591} 9592 9593int x = 1; 9594int y = 0; 9595int z; 9596int nan; 9597 9598int main () 9599{ 9600 signal (SIGFPE, sigfpe_handler); 9601/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ 9602#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) 9603 signal (SIGTRAP, sigfpe_handler); 9604#endif 9605/* Linux/SPARC yields signal SIGILL. */ 9606#if defined (__sparc__) && defined (__linux__) 9607 signal (SIGILL, sigfpe_handler); 9608#endif 9609 9610 z = x / y; 9611 nan = y / y; 9612 exit (1); 9613} 9614], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, 9615 [ 9616 # Guess based on the CPU. 9617 case "$host_cpu" in 9618 alpha* | i[34567]86 | m68k | s390*) 9619 gt_cv_int_divbyzero_sigfpe="guessing yes";; 9620 *) 9621 gt_cv_int_divbyzero_sigfpe="guessing no";; 9622 esac 9623 ]) 9624 ]) 9625 case "$gt_cv_int_divbyzero_sigfpe" in 9626 *yes) value=1;; 9627 *) value=0;; 9628 esac 9629 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, 9630 [Define if integer division by zero raises signal SIGFPE.]) 9631]) 9632 9633# uintmax_t.m4 serial 9 9634dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. 9635dnl This file is free software; the Free Software Foundation 9636dnl gives unlimited permission to copy and/or distribute it, 9637dnl with or without modifications, as long as this notice is preserved. 9638 9639dnl From Paul Eggert. 9640 9641AC_PREREQ(2.13) 9642 9643# Define uintmax_t to 'unsigned long' or 'unsigned long long' 9644# if it is not already defined in <stdint.h> or <inttypes.h>. 9645 9646AC_DEFUN([gl_AC_TYPE_UINTMAX_T], 9647[ 9648 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) 9649 AC_REQUIRE([gl_AC_HEADER_STDINT_H]) 9650 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then 9651 AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) 9652 test $ac_cv_type_unsigned_long_long = yes \ 9653 && ac_type='unsigned long long' \ 9654 || ac_type='unsigned long' 9655 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 9656 [Define to unsigned long or unsigned long long 9657 if <stdint.h> and <inttypes.h> don't define.]) 9658 else 9659 AC_DEFINE(HAVE_UINTMAX_T, 1, 9660 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) 9661 fi 9662]) 9663 9664# ulonglong.m4 serial 4 9665dnl Copyright (C) 1999-2004 Free Software Foundation, Inc. 9666dnl This file is free software; the Free Software Foundation 9667dnl gives unlimited permission to copy and/or distribute it, 9668dnl with or without modifications, as long as this notice is preserved. 9669 9670dnl From Paul Eggert. 9671 9672# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. 9673 9674AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], 9675[ 9676 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, 9677 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;], 9678 [unsigned long long ullmax = (unsigned long long) -1; 9679 return ull << i | ull >> i | ullmax / ull | ullmax % ull;], 9680 ac_cv_type_unsigned_long_long=yes, 9681 ac_cv_type_unsigned_long_long=no)]) 9682 if test $ac_cv_type_unsigned_long_long = yes; then 9683 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 9684 [Define if you have the 'unsigned long long' type.]) 9685 fi 9686]) 9687 9688# inttypes.m4 serial 1 (gettext-0.11.4) 9689dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 9690dnl This file is free software; the Free Software Foundation 9691dnl gives unlimited permission to copy and/or distribute it, 9692dnl with or without modifications, as long as this notice is preserved. 9693 9694dnl From Paul Eggert. 9695 9696# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with 9697# <sys/types.h>. 9698 9699AC_DEFUN([gt_HEADER_INTTYPES_H], 9700[ 9701 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, 9702 [ 9703 AC_TRY_COMPILE( 9704 [#include <sys/types.h> 9705#include <inttypes.h>], 9706 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) 9707 ]) 9708 if test $gt_cv_header_inttypes_h = yes; then 9709 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, 9710 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) 9711 fi 9712]) 9713 9714# inttypes-pri.m4 serial 1 (gettext-0.11.4) 9715dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 9716dnl This file is free software; the Free Software Foundation 9717dnl gives unlimited permission to copy and/or distribute it, 9718dnl with or without modifications, as long as this notice is preserved. 9719 9720dnl From Bruno Haible. 9721 9722# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* 9723# macros to non-string values. This is the case on AIX 4.3.3. 9724 9725AC_DEFUN([gt_INTTYPES_PRI], 9726[ 9727 AC_REQUIRE([gt_HEADER_INTTYPES_H]) 9728 if test $gt_cv_header_inttypes_h = yes; then 9729 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], 9730 gt_cv_inttypes_pri_broken, 9731 [ 9732 AC_TRY_COMPILE([#include <inttypes.h> 9733#ifdef PRId32 9734char *p = PRId32; 9735#endif 9736], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) 9737 ]) 9738 fi 9739 if test "$gt_cv_inttypes_pri_broken" = yes; then 9740 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, 9741 [Define if <inttypes.h> exists and defines unusable PRI* macros.]) 9742 fi 9743]) 9744 9745# xsize.m4 serial 3 9746dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. 9747dnl This file is free software; the Free Software Foundation 9748dnl gives unlimited permission to copy and/or distribute it, 9749dnl with or without modifications, as long as this notice is preserved. 9750 9751AC_DEFUN([gl_XSIZE], 9752[ 9753 dnl Prerequisites of lib/xsize.h. 9754 AC_REQUIRE([gl_SIZE_MAX]) 9755 AC_REQUIRE([AC_C_INLINE]) 9756 AC_CHECK_HEADERS(stdint.h) 9757]) 9758 9759# size_max.m4 serial 2 9760dnl Copyright (C) 2003 Free Software Foundation, Inc. 9761dnl This file is free software; the Free Software Foundation 9762dnl gives unlimited permission to copy and/or distribute it, 9763dnl with or without modifications, as long as this notice is preserved. 9764 9765dnl From Bruno Haible. 9766 9767AC_DEFUN([gl_SIZE_MAX], 9768[ 9769 AC_CHECK_HEADERS(stdint.h) 9770 dnl First test whether the system already has SIZE_MAX. 9771 AC_MSG_CHECKING([for SIZE_MAX]) 9772 result= 9773 AC_EGREP_CPP([Found it], [ 9774#include <limits.h> 9775#if HAVE_STDINT_H 9776#include <stdint.h> 9777#endif 9778#ifdef SIZE_MAX 9779Found it 9780#endif 9781], result=yes) 9782 if test -z "$result"; then 9783 dnl Define it ourselves. Here we assume that the type 'size_t' is not wider 9784 dnl than the type 'unsigned long'. 9785 dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', 9786 dnl which is guaranteed to work from LONG_MIN to LONG_MAX. 9787 _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, 9788 [#include <stddef.h>], result=?) 9789 _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, 9790 [#include <stddef.h>], result=?) 9791 _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, 9792 [#include <stddef.h>], result=?) 9793 if test "$fits_in_uint" = 1; then 9794 dnl Even though SIZE_MAX fits in an unsigned int, it must be of type 9795 dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. 9796 AC_TRY_COMPILE([#include <stddef.h> 9797 extern size_t foo; 9798 extern unsigned long foo; 9799 ], [], fits_in_uint=0) 9800 fi 9801 if test -z "$result"; then 9802 if test "$fits_in_uint" = 1; then 9803 result="$res_hi$res_lo"U 9804 else 9805 result="$res_hi$res_lo"UL 9806 fi 9807 else 9808 dnl Shouldn't happen, but who knows... 9809 result='~(size_t)0' 9810 fi 9811 fi 9812 AC_MSG_RESULT([$result]) 9813 if test "$result" != yes; then 9814 AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], 9815 [Define as the maximum value of type 'size_t', if the system doesn't define it.]) 9816 fi 9817]) 9818 9819# codeset.m4 serial AM1 (gettext-0.10.40) 9820dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 9821dnl This file is free software; the Free Software Foundation 9822dnl gives unlimited permission to copy and/or distribute it, 9823dnl with or without modifications, as long as this notice is preserved. 9824 9825dnl From Bruno Haible. 9826 9827AC_DEFUN([AM_LANGINFO_CODESET], 9828[ 9829 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 9830 [AC_TRY_LINK([#include <langinfo.h>], 9831 [char* cs = nl_langinfo(CODESET);], 9832 am_cv_langinfo_codeset=yes, 9833 am_cv_langinfo_codeset=no) 9834 ]) 9835 if test $am_cv_langinfo_codeset = yes; then 9836 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 9837 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) 9838 fi 9839]) 9840 9841# lcmessage.m4 serial 4 (gettext-0.14.2) 9842dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. 9843dnl This file is free software; the Free Software Foundation 9844dnl gives unlimited permission to copy and/or distribute it, 9845dnl with or without modifications, as long as this notice is preserved. 9846dnl 9847dnl This file can can be used in projects which are not available under 9848dnl the GNU General Public License or the GNU Library General Public 9849dnl License but which still want to provide support for the GNU gettext 9850dnl functionality. 9851dnl Please note that the actual code of the GNU gettext library is covered 9852dnl by the GNU Library General Public License, and the rest of the GNU 9853dnl gettext package package is covered by the GNU General Public License. 9854dnl They are *not* in the public domain. 9855 9856dnl Authors: 9857dnl Ulrich Drepper <drepper@cygnus.com>, 1995. 9858 9859# Check whether LC_MESSAGES is available in <locale.h>. 9860 9861AC_DEFUN([gt_LC_MESSAGES], 9862[ 9863 AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, 9864 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 9865 gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) 9866 if test $gt_cv_val_LC_MESSAGES = yes; then 9867 AC_DEFINE(HAVE_LC_MESSAGES, 1, 9868 [Define if your <locale.h> file defines LC_MESSAGES.]) 9869 fi 9870]) 9871 9872dnl Configure Paths for Alsa 9873dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org> 9874dnl Christopher Lansdown <lansdoct@cs.alfred.edu> 9875dnl Jaroslav Kysela <perex@suse.cz> 9876dnl Last modification: alsa.m4,v 1.24 2004/09/15 18:48:07 tiwai Exp 9877dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 9878dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate. 9879dnl enables arguments --with-alsa-prefix= 9880dnl --with-alsa-enc-prefix= 9881dnl --disable-alsatest 9882dnl 9883dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified, 9884dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result. 9885dnl 9886AC_DEFUN([AM_PATH_ALSA], 9887[dnl Save the original CFLAGS, LDFLAGS, and LIBS 9888alsa_save_CFLAGS="$CFLAGS" 9889alsa_save_LDFLAGS="$LDFLAGS" 9890alsa_save_LIBS="$LIBS" 9891alsa_found=yes 9892 9893dnl 9894dnl Get the cflags and libraries for alsa 9895dnl 9896AC_ARG_WITH(alsa-prefix, 9897[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)], 9898[alsa_prefix="$withval"], [alsa_prefix=""]) 9899 9900AC_ARG_WITH(alsa-inc-prefix, 9901[ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)], 9902[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""]) 9903 9904dnl FIXME: this is not yet implemented 9905AC_ARG_ENABLE(alsatest, 9906[ --disable-alsatest Do not try to compile and run a test Alsa program], 9907[enable_alsatest="$enableval"], 9908[enable_alsatest=yes]) 9909 9910dnl Add any special include directories 9911AC_MSG_CHECKING(for ALSA CFLAGS) 9912if test "$alsa_inc_prefix" != "" ; then 9913 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix" 9914 CFLAGS="$CFLAGS -I$alsa_inc_prefix" 9915fi 9916AC_MSG_RESULT($ALSA_CFLAGS) 9917 9918dnl add any special lib dirs 9919AC_MSG_CHECKING(for ALSA LDFLAGS) 9920if test "$alsa_prefix" != "" ; then 9921 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix" 9922 LDFLAGS="$LDFLAGS $ALSA_LIBS" 9923fi 9924 9925dnl add the alsa library 9926ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" 9927LIBS="$ALSA_LIBS $LIBS" 9928AC_MSG_RESULT($ALSA_LIBS) 9929 9930dnl Check for a working version of libasound that is of the right version. 9931min_alsa_version=ifelse([$1], ,0.1.1,$1) 9932AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version) 9933no_alsa="" 9934 alsa_min_major_version=`echo $min_alsa_version | \ 9935 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 9936 alsa_min_minor_version=`echo $min_alsa_version | \ 9937 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 9938 alsa_min_micro_version=`echo $min_alsa_version | \ 9939 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 9940 9941AC_LANG_SAVE 9942AC_LANG_C 9943AC_TRY_COMPILE([ 9944#include <alsa/asoundlib.h> 9945], [ 9946/* ensure backward compatibility */ 9947#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) 9948#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR 9949#endif 9950#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) 9951#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR 9952#endif 9953#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) 9954#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR 9955#endif 9956 9957# if(SND_LIB_MAJOR > $alsa_min_major_version) 9958 exit(0); 9959# else 9960# if(SND_LIB_MAJOR < $alsa_min_major_version) 9961# error not present 9962# endif 9963 9964# if(SND_LIB_MINOR > $alsa_min_minor_version) 9965 exit(0); 9966# else 9967# if(SND_LIB_MINOR < $alsa_min_minor_version) 9968# error not present 9969# endif 9970 9971# if(SND_LIB_SUBMINOR < $alsa_min_micro_version) 9972# error not present 9973# endif 9974# endif 9975# endif 9976exit(0); 9977], 9978 [AC_MSG_RESULT(found.)], 9979 [AC_MSG_RESULT(not present.) 9980 ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)]) 9981 alsa_found=no] 9982) 9983AC_LANG_RESTORE 9984 9985dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. 9986if test "x$enable_alsatest" = "xyes"; then 9987AC_CHECK_LIB([asound], [snd_ctl_open],, 9988 [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) 9989 alsa_found=no] 9990) 9991fi 9992 9993if test "x$alsa_found" = "xyes" ; then 9994 ifelse([$2], , :, [$2]) 9995 LIBS=`echo $LIBS | sed 's/-lasound//g'` 9996 LIBS=`echo $LIBS | sed 's/ //'` 9997 LIBS="-lasound $LIBS" 9998fi 9999if test "x$alsa_found" = "xno" ; then 10000 ifelse([$3], , :, [$3]) 10001 CFLAGS="$alsa_save_CFLAGS" 10002 LDFLAGS="$alsa_save_LDFLAGS" 10003 LIBS="$alsa_save_LIBS" 10004 ALSA_CFLAGS="" 10005 ALSA_LIBS="" 10006fi 10007 10008dnl That should be it. Now just export out symbols: 10009AC_SUBST(ALSA_CFLAGS) 10010AC_SUBST(ALSA_LIBS) 10011]) 10012 10013 10014