aclocal.m4 revision 2d8abe4f
1# generated automatically by aclocal 1.10 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006 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 14m4_if(m4_PACKAGE_VERSION, [2.61],, 15[m4_fatal([this file was generated for autoconf 2.61. 16You have another version of autoconf. If you want to use that, 17you should regenerate the build system entirely.], [63])]) 18 19dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 20dnl 21dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 22dnl 23dnl Permission is hereby granted, free of charge, to any person obtaining a 24dnl copy of this software and associated documentation files (the 25dnl "Software"), to deal in the Software without restriction, including 26dnl without limitation the rights to use, copy, modify, merge, publish, 27dnl distribute, and/or sell copies of the Software, and to permit persons 28dnl to whom the Software is furnished to do so, provided that the above 29dnl copyright notice(s) and this permission notice appear in all copies of 30dnl the Software and that both the above copyright notice(s) and this 31dnl permission notice appear in supporting documentation. 32dnl 33dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 34dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 35dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 36dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 37dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 38dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 39dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 40dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 41dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 42dnl 43dnl Except as contained in this notice, the name of a copyright holder 44dnl shall not be used in advertising or otherwise to promote the sale, use 45dnl or other dealings in this Software without prior written authorization 46dnl of the copyright holder. 47 48# XORG_MACROS_VERSION(required-version) 49# ------------------------------------- 50# Minimum version: 1.1.0 51# 52# If you're using a macro added in Version 1.1 or newer, include this in 53# your configure.ac with the minimum required version, such as: 54# XORG_MACROS_VERSION(1.1) 55# 56# To force at least a version with this macro defined, also add: 57# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 58# 59# 60# See the "minimum version" comment for each macro you use to see what 61# version you require. 62AC_DEFUN([XORG_MACROS_VERSION],[ 63 [XORG_MACROS_needed_version=$1 64 XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 65 XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 66 AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 67 [XORG_MACROS_version=1.2.1 68 XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 69 XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 70 if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 71 AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 72 fi 73 if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 74 AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 75 fi 76 AC_MSG_RESULT([yes, $XORG_MACROS_version]) 77]) # XORG_MACROS_VERSION 78 79# XORG_PROG_RAWCPP() 80# ------------------ 81# Minimum version: 1.0.0 82# 83# Find cpp program and necessary flags for use in pre-processing text files 84# such as man pages and config files 85AC_DEFUN([XORG_PROG_RAWCPP],[ 86AC_REQUIRE([AC_PROG_CPP]) 87AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 88 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 89 90# Check for flag to avoid builtin definitions - assumes unix is predefined, 91# which is not the best choice for supporting other OS'es, but covers most 92# of the ones we need for now. 93AC_MSG_CHECKING([if $RAWCPP requires -undef]) 94AC_LANG_CONFTEST([Does cpp redefine unix ?]) 95if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96 AC_MSG_RESULT([no]) 97else 98 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99 RAWCPPFLAGS=-undef 100 AC_MSG_RESULT([yes]) 101 # under Cygwin unix is still defined even with -undef 102 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 103 RAWCPPFLAGS="-undef -ansi" 104 AC_MSG_RESULT([yes, with -ansi]) 105 else 106 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 107 fi 108fi 109rm -f conftest.$ac_ext 110 111AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 112AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 113if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 114 AC_MSG_RESULT([no]) 115else 116 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 117 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 118 AC_MSG_RESULT([yes]) 119 else 120 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 121 fi 122fi 123rm -f conftest.$ac_ext 124AC_SUBST(RAWCPPFLAGS) 125]) # XORG_PROG_RAWCPP 126 127# XORG_MANPAGE_SECTIONS() 128# ----------------------- 129# Minimum version: 1.0.0 130# 131# Determine which sections man pages go in for the different man page types 132# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 133# Not sure if there's any better way than just hardcoding by OS name. 134# Override default settings by setting environment variables 135 136AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 137AC_REQUIRE([AC_CANONICAL_HOST]) 138 139if test x$APP_MAN_SUFFIX = x ; then 140 APP_MAN_SUFFIX=1 141fi 142if test x$APP_MAN_DIR = x ; then 143 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 144fi 145 146if test x$LIB_MAN_SUFFIX = x ; then 147 LIB_MAN_SUFFIX=3 148fi 149if test x$LIB_MAN_DIR = x ; then 150 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 151fi 152 153if test x$FILE_MAN_SUFFIX = x ; then 154 case $host_os in 155 solaris*) FILE_MAN_SUFFIX=4 ;; 156 *) FILE_MAN_SUFFIX=5 ;; 157 esac 158fi 159if test x$FILE_MAN_DIR = x ; then 160 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 161fi 162 163if test x$MISC_MAN_SUFFIX = x ; then 164 case $host_os in 165 solaris*) MISC_MAN_SUFFIX=5 ;; 166 *) MISC_MAN_SUFFIX=7 ;; 167 esac 168fi 169if test x$MISC_MAN_DIR = x ; then 170 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 171fi 172 173if test x$DRIVER_MAN_SUFFIX = x ; then 174 case $host_os in 175 solaris*) DRIVER_MAN_SUFFIX=7 ;; 176 *) DRIVER_MAN_SUFFIX=4 ;; 177 esac 178fi 179if test x$DRIVER_MAN_DIR = x ; then 180 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 181fi 182 183if test x$ADMIN_MAN_SUFFIX = x ; then 184 case $host_os in 185 solaris*) ADMIN_MAN_SUFFIX=1m ;; 186 *) ADMIN_MAN_SUFFIX=8 ;; 187 esac 188fi 189if test x$ADMIN_MAN_DIR = x ; then 190 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 191fi 192 193 194AC_SUBST([APP_MAN_SUFFIX]) 195AC_SUBST([LIB_MAN_SUFFIX]) 196AC_SUBST([FILE_MAN_SUFFIX]) 197AC_SUBST([MISC_MAN_SUFFIX]) 198AC_SUBST([DRIVER_MAN_SUFFIX]) 199AC_SUBST([ADMIN_MAN_SUFFIX]) 200AC_SUBST([APP_MAN_DIR]) 201AC_SUBST([LIB_MAN_DIR]) 202AC_SUBST([FILE_MAN_DIR]) 203AC_SUBST([MISC_MAN_DIR]) 204AC_SUBST([DRIVER_MAN_DIR]) 205AC_SUBST([ADMIN_MAN_DIR]) 206]) # XORG_MANPAGE_SECTIONS 207 208# XORG_CHECK_LINUXDOC 209# ------------------- 210# Minimum version: 1.0.0 211# 212# Defines the variable MAKE_TEXT if the necessary tools and 213# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 214# Whether or not the necessary tools and files are found can be checked 215# with the AM_CONDITIONAL "BUILD_LINUXDOC" 216AC_DEFUN([XORG_CHECK_LINUXDOC],[ 217if test x$XORG_SGML_PATH = x ; then 218 XORG_SGML_PATH=$prefix/share/sgml 219fi 220HAVE_DEFS_ENT= 221 222if test x"$cross_compiling" = x"yes" ; then 223 HAVE_DEFS_ENT=no 224else 225 AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 226fi 227 228AC_PATH_PROG(LINUXDOC, linuxdoc) 229AC_PATH_PROG(PS2PDF, ps2pdf) 230 231AC_MSG_CHECKING([Whether to build documentation]) 232 233if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 234 BUILDDOC=yes 235else 236 BUILDDOC=no 237fi 238 239AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 240 241AC_MSG_RESULT([$BUILDDOC]) 242 243AC_MSG_CHECKING([Whether to build pdf documentation]) 244 245if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 246 BUILDPDFDOC=yes 247else 248 BUILDPDFDOC=no 249fi 250 251AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 252 253AC_MSG_RESULT([$BUILDPDFDOC]) 254 255MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 256MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 257MAKE_PDF="$PS2PDF" 258MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 259 260AC_SUBST(MAKE_TEXT) 261AC_SUBST(MAKE_PS) 262AC_SUBST(MAKE_PDF) 263AC_SUBST(MAKE_HTML) 264]) # XORG_CHECK_LINUXDOC 265 266# XORG_CHECK_DOCBOOK 267# ------------------- 268# Minimum version: 1.0.0 269# 270# Checks for the ability to build output formats from SGML DocBook source. 271# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 272# indicates whether the necessary tools and files are found and, if set, 273# $(MAKE_XXX) blah.sgml will produce blah.xxx. 274AC_DEFUN([XORG_CHECK_DOCBOOK],[ 275if test x$XORG_SGML_PATH = x ; then 276 XORG_SGML_PATH=$prefix/share/sgml 277fi 278HAVE_DEFS_ENT= 279BUILDTXTDOC=no 280BUILDPDFDOC=no 281BUILDPSDOC=no 282BUILDHTMLDOC=no 283 284AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 285 286AC_PATH_PROG(DOCBOOKPS, docbook2ps) 287AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 288AC_PATH_PROG(DOCBOOKHTML, docbook2html) 289AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 290 291AC_MSG_CHECKING([Whether to build text documentation]) 292if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 293 test x$BUILD_TXTDOC != xno; then 294 BUILDTXTDOC=yes 295fi 296AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 297AC_MSG_RESULT([$BUILDTXTDOC]) 298 299AC_MSG_CHECKING([Whether to build PDF documentation]) 300if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 301 test x$BUILD_PDFDOC != xno; then 302 BUILDPDFDOC=yes 303fi 304AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 305AC_MSG_RESULT([$BUILDPDFDOC]) 306 307AC_MSG_CHECKING([Whether to build PostScript documentation]) 308if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 309 test x$BUILD_PSDOC != xno; then 310 BUILDPSDOC=yes 311fi 312AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 313AC_MSG_RESULT([$BUILDPSDOC]) 314 315AC_MSG_CHECKING([Whether to build HTML documentation]) 316if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 317 test x$BUILD_HTMLDOC != xno; then 318 BUILDHTMLDOC=yes 319fi 320AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 321AC_MSG_RESULT([$BUILDHTMLDOC]) 322 323MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 324MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 325MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 326MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 327 328AC_SUBST(MAKE_TEXT) 329AC_SUBST(MAKE_PS) 330AC_SUBST(MAKE_PDF) 331AC_SUBST(MAKE_HTML) 332]) # XORG_CHECK_DOCBOOK 333 334# XORG_CHECK_MALLOC_ZERO 335# ---------------------- 336# Minimum version: 1.0.0 337# 338# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 339# malloc(0) returns NULL. Packages should add one of these cflags to 340# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 341AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 342AC_ARG_ENABLE(malloc0returnsnull, 343 AC_HELP_STRING([--enable-malloc0returnsnull], 344 [malloc(0) returns NULL (default: auto)]), 345 [MALLOC_ZERO_RETURNS_NULL=$enableval], 346 [MALLOC_ZERO_RETURNS_NULL=auto]) 347 348AC_MSG_CHECKING([whether malloc(0) returns NULL]) 349if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 350 AC_RUN_IFELSE([ 351char *malloc(); 352char *realloc(); 353char *calloc(); 354main() { 355 char *m0, *r0, *c0, *p; 356 m0 = malloc(0); 357 p = malloc(10); 358 r0 = realloc(p,0); 359 c0 = calloc(0); 360 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 361}], 362 [MALLOC_ZERO_RETURNS_NULL=yes], 363 [MALLOC_ZERO_RETURNS_NULL=no]) 364fi 365AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 366 367if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 368 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 369 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 370 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 371else 372 MALLOC_ZERO_CFLAGS="" 373 XMALLOC_ZERO_CFLAGS="" 374 XTMALLOC_ZERO_CFLAGS="" 375fi 376 377AC_SUBST([MALLOC_ZERO_CFLAGS]) 378AC_SUBST([XMALLOC_ZERO_CFLAGS]) 379AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 380]) # XORG_CHECK_MALLOC_ZERO 381 382# XORG_WITH_LINT() 383# ---------------- 384# Minimum version: 1.1.0 385# 386# Sets up flags for source checkers such as lint and sparse if --with-lint 387# is specified. (Use --with-lint=sparse for sparse.) 388# Sets $LINT to name of source checker passed with --with-lint (default: lint) 389# Sets $LINT_FLAGS to flags to pass to source checker 390# Sets LINT automake conditional if enabled (default: disabled) 391# 392AC_DEFUN([XORG_WITH_LINT],[ 393 394# Allow checking code with lint, sparse, etc. 395AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 396 [Use a lint-style source code checker (default: disabled)])], 397 [use_lint=$withval], [use_lint=no]) 398if test "x$use_lint" = "xyes" ; then 399 LINT="lint" 400else 401 LINT="$use_lint" 402fi 403if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 404 case $LINT in 405 lint|*/lint) 406 case $host_os in 407 solaris*) 408 LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 409 ;; 410 esac 411 ;; 412 esac 413fi 414 415AC_SUBST(LINT) 416AC_SUBST(LINT_FLAGS) 417AM_CONDITIONAL(LINT, [test x$LINT != xno]) 418 419]) # XORG_WITH_LINT 420 421# XORG_LINT_LIBRARY(LIBNAME) 422# -------------------------- 423# Minimum version: 1.1.0 424# 425# Sets up flags for building lint libraries for checking programs that call 426# functions in the library. 427# Disabled by default, enable with --enable-lint-library 428# Sets: 429# @LINTLIB@ - name of lint library file to make 430# MAKE_LINT_LIB - automake conditional 431# 432 433AC_DEFUN([XORG_LINT_LIBRARY],[ 434AC_REQUIRE([XORG_WITH_LINT]) 435# Build lint "library" for more indepth checks of programs calling this library 436AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 437 [Create lint library (default: disabled)])], 438 [make_lint_lib=$enableval], [make_lint_lib=no]) 439if test "x$make_lint_lib" != "xno" ; then 440 if test "x$LINT" = "xno" ; then 441 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 442 fi 443 if test "x$make_lint_lib" = "xyes" ; then 444 LINTLIB=llib-l$1.ln 445 else 446 LINTLIB=$make_lint_lib 447 fi 448fi 449AC_SUBST(LINTLIB) 450AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 451 452]) # XORG_LINT_LIBRARY 453 454# XORG_CWARNFLAGS 455# --------------- 456# Minimum version: 1.2.0 457# 458# Defines CWARNFLAGS to enable C compiler warnings. 459# 460AC_DEFUN([XORG_CWARNFLAGS], [ 461AC_REQUIRE([AC_PROG_CC]) 462if test "x$GCC" = xyes ; then 463 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 464-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 465-Wbad-function-cast" 466 case `gcc -dumpversion` in 467 3.4.* | 4.*) 468 CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 469 ;; 470 esac 471else 472 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 473 if test "x$SUNCC" = "xyes"; then 474 CWARNFLAGS="-v" 475 fi 476fi 477AC_SUBST(CWARNFLAGS) 478]) # XORG_CWARNFLAGS 479dnl Copyright 2005 Red Hat, Inc 480dnl 481dnl Permission to use, copy, modify, distribute, and sell this software and its 482dnl documentation for any purpose is hereby granted without fee, provided that 483dnl the above copyright notice appear in all copies and that both that 484dnl copyright notice and this permission notice appear in supporting 485dnl documentation. 486dnl 487dnl The above copyright notice and this permission notice shall be included 488dnl in all copies or substantial portions of the Software. 489dnl 490dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 491dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 492dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 493dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 494dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 495dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 496dnl OTHER DEALINGS IN THE SOFTWARE. 497dnl 498dnl Except as contained in this notice, the name of the copyright holders shall 499dnl not be used in advertising or otherwise to promote the sale, use or 500dnl other dealings in this Software without prior written authorization 501dnl from the copyright holders. 502dnl 503 504# XORG_RELEASE_VERSION 505# -------------------- 506# Adds --with/without-release-string and changes the PACKAGE and 507# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 508# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 509# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 510 511AC_DEFUN([XORG_RELEASE_VERSION],[ 512 AC_ARG_WITH(release-version, 513 AC_HELP_STRING([--with-release-version=STRING], 514 [Use release version string in package name]), 515 [RELEASE_VERSION="$withval"], 516 [RELEASE_VERSION=""]) 517 if test "x$RELEASE_VERSION" != "x"; then 518 PACKAGE="$PACKAGE-$RELEASE_VERSION" 519 PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 520 AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 521 fi 522 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 523 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 524 [Major version of this package]) 525 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 526 if test "x$PVM" = "x"; then 527 PVM="0" 528 fi 529 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 530 [$PVM], 531 [Minor version of this package]) 532 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 533 if test "x$PVP" = "x"; then 534 PVP="0" 535 fi 536 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 537 [$PVP], 538 [Patch version of this package]) 539]) 540 541# XORG_CHANGELOG() 542# ---------------- 543# Minimum version: 1.2.0 544# 545# Defines the variable CHANGELOG_CMD as the command to generate 546# ChangeLog from git. 547# 548# Arrange that distcleancheck ignores ChangeLog left over by distclean. 549# 550AC_DEFUN([XORG_CHANGELOG], [ 551CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 552mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 553echo 'git directory not found: installing possibly empty changelog.' >&2)" 554AC_SUBST([CHANGELOG_CMD]) 555AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 556]) # XORG_CHANGELOG 557 558# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 559# 560# This file is free software; the Free Software Foundation 561# gives unlimited permission to copy and/or distribute it, 562# with or without modifications, as long as this notice is preserved. 563 564# AM_AUTOMAKE_VERSION(VERSION) 565# ---------------------------- 566# Automake X.Y traces this macro to ensure aclocal.m4 has been 567# generated from the m4 files accompanying Automake X.Y. 568# (This private macro should not be called outside this file.) 569AC_DEFUN([AM_AUTOMAKE_VERSION], 570[am__api_version='1.10' 571dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 572dnl require some minimum version. Point them to the right macro. 573m4_if([$1], [1.10], [], 574 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 575]) 576 577# _AM_AUTOCONF_VERSION(VERSION) 578# ----------------------------- 579# aclocal traces this macro to find the Autoconf version. 580# This is a private macro too. Using m4_define simplifies 581# the logic in aclocal, which can simply ignore this definition. 582m4_define([_AM_AUTOCONF_VERSION], []) 583 584# AM_SET_CURRENT_AUTOMAKE_VERSION 585# ------------------------------- 586# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 587# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 588AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 589[AM_AUTOMAKE_VERSION([1.10])dnl 590_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) 591 592# AM_AUX_DIR_EXPAND -*- Autoconf -*- 593 594# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 595# 596# This file is free software; the Free Software Foundation 597# gives unlimited permission to copy and/or distribute it, 598# with or without modifications, as long as this notice is preserved. 599 600# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 601# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 602# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 603# 604# Of course, Automake must honor this variable whenever it calls a 605# tool from the auxiliary directory. The problem is that $srcdir (and 606# therefore $ac_aux_dir as well) can be either absolute or relative, 607# depending on how configure is run. This is pretty annoying, since 608# it makes $ac_aux_dir quite unusable in subdirectories: in the top 609# source directory, any form will work fine, but in subdirectories a 610# relative path needs to be adjusted first. 611# 612# $ac_aux_dir/missing 613# fails when called from a subdirectory if $ac_aux_dir is relative 614# $top_srcdir/$ac_aux_dir/missing 615# fails if $ac_aux_dir is absolute, 616# fails when called from a subdirectory in a VPATH build with 617# a relative $ac_aux_dir 618# 619# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 620# are both prefixed by $srcdir. In an in-source build this is usually 621# harmless because $srcdir is `.', but things will broke when you 622# start a VPATH build or use an absolute $srcdir. 623# 624# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 625# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 626# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 627# and then we would define $MISSING as 628# MISSING="\${SHELL} $am_aux_dir/missing" 629# This will work as long as MISSING is not called from configure, because 630# unfortunately $(top_srcdir) has no meaning in configure. 631# However there are other variables, like CC, which are often used in 632# configure, and could therefore not use this "fixed" $ac_aux_dir. 633# 634# Another solution, used here, is to always expand $ac_aux_dir to an 635# absolute PATH. The drawback is that using absolute paths prevent a 636# configured tree to be moved without reconfiguration. 637 638AC_DEFUN([AM_AUX_DIR_EXPAND], 639[dnl Rely on autoconf to set up CDPATH properly. 640AC_PREREQ([2.50])dnl 641# expand $ac_aux_dir to an absolute path 642am_aux_dir=`cd $ac_aux_dir && pwd` 643]) 644 645# AM_CONDITIONAL -*- Autoconf -*- 646 647# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 648# Free Software Foundation, Inc. 649# 650# This file is free software; the Free Software Foundation 651# gives unlimited permission to copy and/or distribute it, 652# with or without modifications, as long as this notice is preserved. 653 654# serial 8 655 656# AM_CONDITIONAL(NAME, SHELL-CONDITION) 657# ------------------------------------- 658# Define a conditional. 659AC_DEFUN([AM_CONDITIONAL], 660[AC_PREREQ(2.52)dnl 661 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 662 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 663AC_SUBST([$1_TRUE])dnl 664AC_SUBST([$1_FALSE])dnl 665_AM_SUBST_NOTMAKE([$1_TRUE])dnl 666_AM_SUBST_NOTMAKE([$1_FALSE])dnl 667if $2; then 668 $1_TRUE= 669 $1_FALSE='#' 670else 671 $1_TRUE='#' 672 $1_FALSE= 673fi 674AC_CONFIG_COMMANDS_PRE( 675[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 676 AC_MSG_ERROR([[conditional "$1" was never defined. 677Usually this means the macro was only invoked conditionally.]]) 678fi])]) 679 680# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 681# Free Software Foundation, Inc. 682# 683# This file is free software; the Free Software Foundation 684# gives unlimited permission to copy and/or distribute it, 685# with or without modifications, as long as this notice is preserved. 686 687# serial 9 688 689# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 690# written in clear, in which case automake, when reading aclocal.m4, 691# will think it sees a *use*, and therefore will trigger all it's 692# C support machinery. Also note that it means that autoscan, seeing 693# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 694 695 696# _AM_DEPENDENCIES(NAME) 697# ---------------------- 698# See how the compiler implements dependency checking. 699# NAME is "CC", "CXX", "GCJ", or "OBJC". 700# We try a few techniques and use that to set a single cache variable. 701# 702# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 703# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 704# dependency, and given that the user is not expected to run this macro, 705# just rely on AC_PROG_CC. 706AC_DEFUN([_AM_DEPENDENCIES], 707[AC_REQUIRE([AM_SET_DEPDIR])dnl 708AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 709AC_REQUIRE([AM_MAKE_INCLUDE])dnl 710AC_REQUIRE([AM_DEP_TRACK])dnl 711 712ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 713 [$1], CXX, [depcc="$CXX" am_compiler_list=], 714 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 715 [$1], UPC, [depcc="$UPC" am_compiler_list=], 716 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 717 [depcc="$$1" am_compiler_list=]) 718 719AC_CACHE_CHECK([dependency style of $depcc], 720 [am_cv_$1_dependencies_compiler_type], 721[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 722 # We make a subdir and do the tests there. Otherwise we can end up 723 # making bogus files that we don't know about and never remove. For 724 # instance it was reported that on HP-UX the gcc test will end up 725 # making a dummy file named `D' -- because `-MD' means `put the output 726 # in D'. 727 mkdir conftest.dir 728 # Copy depcomp to subdir because otherwise we won't find it if we're 729 # using a relative directory. 730 cp "$am_depcomp" conftest.dir 731 cd conftest.dir 732 # We will build objects and dependencies in a subdirectory because 733 # it helps to detect inapplicable dependency modes. For instance 734 # both Tru64's cc and ICC support -MD to output dependencies as a 735 # side effect of compilation, but ICC will put the dependencies in 736 # the current directory while Tru64 will put them in the object 737 # directory. 738 mkdir sub 739 740 am_cv_$1_dependencies_compiler_type=none 741 if test "$am_compiler_list" = ""; then 742 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 743 fi 744 for depmode in $am_compiler_list; do 745 # Setup a source with many dependencies, because some compilers 746 # like to wrap large dependency lists on column 80 (with \), and 747 # we should not choose a depcomp mode which is confused by this. 748 # 749 # We need to recreate these files for each test, as the compiler may 750 # overwrite some of them when testing with obscure command lines. 751 # This happens at least with the AIX C compiler. 752 : > sub/conftest.c 753 for i in 1 2 3 4 5 6; do 754 echo '#include "conftst'$i'.h"' >> sub/conftest.c 755 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 756 # Solaris 8's {/usr,}/bin/sh. 757 touch sub/conftst$i.h 758 done 759 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 760 761 case $depmode in 762 nosideeffect) 763 # after this tag, mechanisms are not by side-effect, so they'll 764 # only be used when explicitly requested 765 if test "x$enable_dependency_tracking" = xyes; then 766 continue 767 else 768 break 769 fi 770 ;; 771 none) break ;; 772 esac 773 # We check with `-c' and `-o' for the sake of the "dashmstdout" 774 # mode. It turns out that the SunPro C++ compiler does not properly 775 # handle `-M -o', and we need to detect this. 776 if depmode=$depmode \ 777 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 778 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 779 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 780 >/dev/null 2>conftest.err && 781 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 782 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 783 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 784 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 785 # icc doesn't choke on unknown options, it will just issue warnings 786 # or remarks (even with -Werror). So we grep stderr for any message 787 # that says an option was ignored or not supported. 788 # When given -MP, icc 7.0 and 7.1 complain thusly: 789 # icc: Command line warning: ignoring option '-M'; no argument required 790 # The diagnosis changed in icc 8.0: 791 # icc: Command line remark: option '-MP' not supported 792 if (grep 'ignoring option' conftest.err || 793 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 794 am_cv_$1_dependencies_compiler_type=$depmode 795 break 796 fi 797 fi 798 done 799 800 cd .. 801 rm -rf conftest.dir 802else 803 am_cv_$1_dependencies_compiler_type=none 804fi 805]) 806AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 807AM_CONDITIONAL([am__fastdep$1], [ 808 test "x$enable_dependency_tracking" != xno \ 809 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 810]) 811 812 813# AM_SET_DEPDIR 814# ------------- 815# Choose a directory name for dependency files. 816# This macro is AC_REQUIREd in _AM_DEPENDENCIES 817AC_DEFUN([AM_SET_DEPDIR], 818[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 819AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 820]) 821 822 823# AM_DEP_TRACK 824# ------------ 825AC_DEFUN([AM_DEP_TRACK], 826[AC_ARG_ENABLE(dependency-tracking, 827[ --disable-dependency-tracking speeds up one-time build 828 --enable-dependency-tracking do not reject slow dependency extractors]) 829if test "x$enable_dependency_tracking" != xno; then 830 am_depcomp="$ac_aux_dir/depcomp" 831 AMDEPBACKSLASH='\' 832fi 833AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 834AC_SUBST([AMDEPBACKSLASH])dnl 835_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 836]) 837 838# Generate code to set up dependency tracking. -*- Autoconf -*- 839 840# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 841# Free Software Foundation, Inc. 842# 843# This file is free software; the Free Software Foundation 844# gives unlimited permission to copy and/or distribute it, 845# with or without modifications, as long as this notice is preserved. 846 847#serial 3 848 849# _AM_OUTPUT_DEPENDENCY_COMMANDS 850# ------------------------------ 851AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 852[for mf in $CONFIG_FILES; do 853 # Strip MF so we end up with the name of the file. 854 mf=`echo "$mf" | sed -e 's/:.*$//'` 855 # Check whether this is an Automake generated Makefile or not. 856 # We used to match only the files named `Makefile.in', but 857 # some people rename them; so instead we look at the file content. 858 # Grep'ing the first line is not enough: some people post-process 859 # each Makefile.in and add a new line on top of each file to say so. 860 # Grep'ing the whole file is not good either: AIX grep has a line 861 # limit of 2048, but all sed's we know have understand at least 4000. 862 if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then 863 dirpart=`AS_DIRNAME("$mf")` 864 else 865 continue 866 fi 867 # Extract the definition of DEPDIR, am__include, and am__quote 868 # from the Makefile without running `make'. 869 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 870 test -z "$DEPDIR" && continue 871 am__include=`sed -n 's/^am__include = //p' < "$mf"` 872 test -z "am__include" && continue 873 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 874 # When using ansi2knr, U may be empty or an underscore; expand it 875 U=`sed -n 's/^U = //p' < "$mf"` 876 # Find all dependency output files, they are included files with 877 # $(DEPDIR) in their names. We invoke sed twice because it is the 878 # simplest approach to changing $(DEPDIR) to its actual value in the 879 # expansion. 880 for file in `sed -n " 881 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 882 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 883 # Make sure the directory exists. 884 test -f "$dirpart/$file" && continue 885 fdir=`AS_DIRNAME(["$file"])` 886 AS_MKDIR_P([$dirpart/$fdir]) 887 # echo "creating $dirpart/$file" 888 echo '# dummy' > "$dirpart/$file" 889 done 890done 891])# _AM_OUTPUT_DEPENDENCY_COMMANDS 892 893 894# AM_OUTPUT_DEPENDENCY_COMMANDS 895# ----------------------------- 896# This macro should only be invoked once -- use via AC_REQUIRE. 897# 898# This code is only required when automatic dependency tracking 899# is enabled. FIXME. This creates each `.P' file that we will 900# need in order to bootstrap the dependency handling code. 901AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 902[AC_CONFIG_COMMANDS([depfiles], 903 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 904 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 905]) 906 907# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 908# Free Software Foundation, Inc. 909# 910# This file is free software; the Free Software Foundation 911# gives unlimited permission to copy and/or distribute it, 912# with or without modifications, as long as this notice is preserved. 913 914# serial 8 915 916# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 917AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 918 919# Do all the work for Automake. -*- Autoconf -*- 920 921# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 922# 2005, 2006 Free Software Foundation, Inc. 923# 924# This file is free software; the Free Software Foundation 925# gives unlimited permission to copy and/or distribute it, 926# with or without modifications, as long as this notice is preserved. 927 928# serial 12 929 930# This macro actually does too much. Some checks are only needed if 931# your package does certain things. But this isn't really a big deal. 932 933# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 934# AM_INIT_AUTOMAKE([OPTIONS]) 935# ----------------------------------------------- 936# The call with PACKAGE and VERSION arguments is the old style 937# call (pre autoconf-2.50), which is being phased out. PACKAGE 938# and VERSION should now be passed to AC_INIT and removed from 939# the call to AM_INIT_AUTOMAKE. 940# We support both call styles for the transition. After 941# the next Automake release, Autoconf can make the AC_INIT 942# arguments mandatory, and then we can depend on a new Autoconf 943# release and drop the old call support. 944AC_DEFUN([AM_INIT_AUTOMAKE], 945[AC_PREREQ([2.60])dnl 946dnl Autoconf wants to disallow AM_ names. We explicitly allow 947dnl the ones we care about. 948m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 949AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 950AC_REQUIRE([AC_PROG_INSTALL])dnl 951if test "`cd $srcdir && pwd`" != "`pwd`"; then 952 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 953 # is not polluted with repeated "-I." 954 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 955 # test to see if srcdir already configured 956 if test -f $srcdir/config.status; then 957 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 958 fi 959fi 960 961# test whether we have cygpath 962if test -z "$CYGPATH_W"; then 963 if (cygpath --version) >/dev/null 2>/dev/null; then 964 CYGPATH_W='cygpath -w' 965 else 966 CYGPATH_W=echo 967 fi 968fi 969AC_SUBST([CYGPATH_W]) 970 971# Define the identity of the package. 972dnl Distinguish between old-style and new-style calls. 973m4_ifval([$2], 974[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 975 AC_SUBST([PACKAGE], [$1])dnl 976 AC_SUBST([VERSION], [$2])], 977[_AM_SET_OPTIONS([$1])dnl 978dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 979m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 980 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 981 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 982 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 983 984_AM_IF_OPTION([no-define],, 985[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 986 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 987 988# Some tools Automake needs. 989AC_REQUIRE([AM_SANITY_CHECK])dnl 990AC_REQUIRE([AC_ARG_PROGRAM])dnl 991AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 992AM_MISSING_PROG(AUTOCONF, autoconf) 993AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 994AM_MISSING_PROG(AUTOHEADER, autoheader) 995AM_MISSING_PROG(MAKEINFO, makeinfo) 996AM_PROG_INSTALL_SH 997AM_PROG_INSTALL_STRIP 998AC_REQUIRE([AM_PROG_MKDIR_P])dnl 999# We need awk for the "check" target. The system "awk" is bad on 1000# some platforms. 1001AC_REQUIRE([AC_PROG_AWK])dnl 1002AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1003AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1004_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1005 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1006 [_AM_PROG_TAR([v7])])]) 1007_AM_IF_OPTION([no-dependencies],, 1008[AC_PROVIDE_IFELSE([AC_PROG_CC], 1009 [_AM_DEPENDENCIES(CC)], 1010 [define([AC_PROG_CC], 1011 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1012AC_PROVIDE_IFELSE([AC_PROG_CXX], 1013 [_AM_DEPENDENCIES(CXX)], 1014 [define([AC_PROG_CXX], 1015 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1016AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1017 [_AM_DEPENDENCIES(OBJC)], 1018 [define([AC_PROG_OBJC], 1019 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1020]) 1021]) 1022 1023 1024# When config.status generates a header, we must update the stamp-h file. 1025# This file resides in the same directory as the config header 1026# that is generated. The stamp files are numbered to have different names. 1027 1028# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1029# loop where config.status creates the headers, so we can generate 1030# our stamp files there. 1031AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1032[# Compute $1's index in $config_headers. 1033_am_stamp_count=1 1034for _am_header in $config_headers :; do 1035 case $_am_header in 1036 $1 | $1:* ) 1037 break ;; 1038 * ) 1039 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1040 esac 1041done 1042echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 1043 1044# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1045# 1046# This file is free software; the Free Software Foundation 1047# gives unlimited permission to copy and/or distribute it, 1048# with or without modifications, as long as this notice is preserved. 1049 1050# AM_PROG_INSTALL_SH 1051# ------------------ 1052# Define $install_sh. 1053AC_DEFUN([AM_PROG_INSTALL_SH], 1054[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1055install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 1056AC_SUBST(install_sh)]) 1057 1058# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1059# 1060# This file is free software; the Free Software Foundation 1061# gives unlimited permission to copy and/or distribute it, 1062# with or without modifications, as long as this notice is preserved. 1063 1064# serial 2 1065 1066# Check whether the underlying file-system supports filenames 1067# with a leading dot. For instance MS-DOS doesn't. 1068AC_DEFUN([AM_SET_LEADING_DOT], 1069[rm -rf .tst 2>/dev/null 1070mkdir .tst 2>/dev/null 1071if test -d .tst; then 1072 am__leading_dot=. 1073else 1074 am__leading_dot=_ 1075fi 1076rmdir .tst 2>/dev/null 1077AC_SUBST([am__leading_dot])]) 1078 1079# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1080# From Jim Meyering 1081 1082# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 1083# Free Software Foundation, Inc. 1084# 1085# This file is free software; the Free Software Foundation 1086# gives unlimited permission to copy and/or distribute it, 1087# with or without modifications, as long as this notice is preserved. 1088 1089# serial 4 1090 1091AC_DEFUN([AM_MAINTAINER_MODE], 1092[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1093 dnl maintainer-mode is disabled by default 1094 AC_ARG_ENABLE(maintainer-mode, 1095[ --enable-maintainer-mode enable make rules and dependencies not useful 1096 (and sometimes confusing) to the casual installer], 1097 USE_MAINTAINER_MODE=$enableval, 1098 USE_MAINTAINER_MODE=no) 1099 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1100 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 1101 MAINT=$MAINTAINER_MODE_TRUE 1102 AC_SUBST(MAINT)dnl 1103] 1104) 1105 1106AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1107 1108# Check to see how 'make' treats includes. -*- Autoconf -*- 1109 1110# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 1111# 1112# This file is free software; the Free Software Foundation 1113# gives unlimited permission to copy and/or distribute it, 1114# with or without modifications, as long as this notice is preserved. 1115 1116# serial 3 1117 1118# AM_MAKE_INCLUDE() 1119# ----------------- 1120# Check to see how make treats includes. 1121AC_DEFUN([AM_MAKE_INCLUDE], 1122[am_make=${MAKE-make} 1123cat > confinc << 'END' 1124am__doit: 1125 @echo done 1126.PHONY: am__doit 1127END 1128# If we don't find an include directive, just comment out the code. 1129AC_MSG_CHECKING([for style of include used by $am_make]) 1130am__include="#" 1131am__quote= 1132_am_result=none 1133# First try GNU make style include. 1134echo "include confinc" > confmf 1135# We grep out `Entering directory' and `Leaving directory' 1136# messages which can occur if `w' ends up in MAKEFLAGS. 1137# In particular we don't look at `^make:' because GNU make might 1138# be invoked under some other name (usually "gmake"), in which 1139# case it prints its new name instead of `make'. 1140if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 1141 am__include=include 1142 am__quote= 1143 _am_result=GNU 1144fi 1145# Now try BSD make style include. 1146if test "$am__include" = "#"; then 1147 echo '.include "confinc"' > confmf 1148 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 1149 am__include=.include 1150 am__quote="\"" 1151 _am_result=BSD 1152 fi 1153fi 1154AC_SUBST([am__include]) 1155AC_SUBST([am__quote]) 1156AC_MSG_RESULT([$_am_result]) 1157rm -f confinc confmf 1158]) 1159 1160# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1161 1162# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 1163# Free Software Foundation, Inc. 1164# 1165# This file is free software; the Free Software Foundation 1166# gives unlimited permission to copy and/or distribute it, 1167# with or without modifications, as long as this notice is preserved. 1168 1169# serial 5 1170 1171# AM_MISSING_PROG(NAME, PROGRAM) 1172# ------------------------------ 1173AC_DEFUN([AM_MISSING_PROG], 1174[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1175$1=${$1-"${am_missing_run}$2"} 1176AC_SUBST($1)]) 1177 1178 1179# AM_MISSING_HAS_RUN 1180# ------------------ 1181# Define MISSING if not defined so far and test if it supports --run. 1182# If it does, set am_missing_run to use it, otherwise, to nothing. 1183AC_DEFUN([AM_MISSING_HAS_RUN], 1184[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1185AC_REQUIRE_AUX_FILE([missing])dnl 1186test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 1187# Use eval to expand $SHELL 1188if eval "$MISSING --run true"; then 1189 am_missing_run="$MISSING --run " 1190else 1191 am_missing_run= 1192 AC_MSG_WARN([`missing' script is too old or missing]) 1193fi 1194]) 1195 1196# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1197# 1198# This file is free software; the Free Software Foundation 1199# gives unlimited permission to copy and/or distribute it, 1200# with or without modifications, as long as this notice is preserved. 1201 1202# AM_PROG_MKDIR_P 1203# --------------- 1204# Check for `mkdir -p'. 1205AC_DEFUN([AM_PROG_MKDIR_P], 1206[AC_PREREQ([2.60])dnl 1207AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1208dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1209dnl while keeping a definition of mkdir_p for backward compatibility. 1210dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1211dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1212dnl Makefile.ins that do not define MKDIR_P, so we do our own 1213dnl adjustment using top_builddir (which is defined more often than 1214dnl MKDIR_P). 1215AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1216case $mkdir_p in 1217 [[\\/$]]* | ?:[[\\/]]*) ;; 1218 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1219esac 1220]) 1221 1222# Helper functions for option handling. -*- Autoconf -*- 1223 1224# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 1225# 1226# This file is free software; the Free Software Foundation 1227# gives unlimited permission to copy and/or distribute it, 1228# with or without modifications, as long as this notice is preserved. 1229 1230# serial 3 1231 1232# _AM_MANGLE_OPTION(NAME) 1233# ----------------------- 1234AC_DEFUN([_AM_MANGLE_OPTION], 1235[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1236 1237# _AM_SET_OPTION(NAME) 1238# ------------------------------ 1239# Set option NAME. Presently that only means defining a flag for this option. 1240AC_DEFUN([_AM_SET_OPTION], 1241[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1242 1243# _AM_SET_OPTIONS(OPTIONS) 1244# ---------------------------------- 1245# OPTIONS is a space-separated list of Automake options. 1246AC_DEFUN([_AM_SET_OPTIONS], 1247[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1248 1249# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1250# ------------------------------------------- 1251# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1252AC_DEFUN([_AM_IF_OPTION], 1253[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1254 1255# Check to make sure that the build environment is sane. -*- Autoconf -*- 1256 1257# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1258# Free Software Foundation, Inc. 1259# 1260# This file is free software; the Free Software Foundation 1261# gives unlimited permission to copy and/or distribute it, 1262# with or without modifications, as long as this notice is preserved. 1263 1264# serial 4 1265 1266# AM_SANITY_CHECK 1267# --------------- 1268AC_DEFUN([AM_SANITY_CHECK], 1269[AC_MSG_CHECKING([whether build environment is sane]) 1270# Just in case 1271sleep 1 1272echo timestamp > conftest.file 1273# Do `set' in a subshell so we don't clobber the current shell's 1274# arguments. Must try -L first in case configure is actually a 1275# symlink; some systems play weird games with the mod time of symlinks 1276# (eg FreeBSD returns the mod time of the symlink's containing 1277# directory). 1278if ( 1279 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 1280 if test "$[*]" = "X"; then 1281 # -L didn't work. 1282 set X `ls -t $srcdir/configure conftest.file` 1283 fi 1284 rm -f conftest.file 1285 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1286 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1287 1288 # If neither matched, then we have a broken ls. This can happen 1289 # if, for instance, CONFIG_SHELL is bash and it inherits a 1290 # broken ls alias from the environment. This has actually 1291 # happened. Such a system could not be considered "sane". 1292 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1293alias in your environment]) 1294 fi 1295 1296 test "$[2]" = conftest.file 1297 ) 1298then 1299 # Ok. 1300 : 1301else 1302 AC_MSG_ERROR([newly created file is older than distributed files! 1303Check your system clock]) 1304fi 1305AC_MSG_RESULT(yes)]) 1306 1307# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1308# 1309# This file is free software; the Free Software Foundation 1310# gives unlimited permission to copy and/or distribute it, 1311# with or without modifications, as long as this notice is preserved. 1312 1313# AM_PROG_INSTALL_STRIP 1314# --------------------- 1315# One issue with vendor `install' (even GNU) is that you can't 1316# specify the program used to strip binaries. This is especially 1317# annoying in cross-compiling environments, where the build's strip 1318# is unlikely to handle the host's binaries. 1319# Fortunately install-sh will honor a STRIPPROG variable, so we 1320# always use install-sh in `make install-strip', and initialize 1321# STRIPPROG with the value of the STRIP variable (set by the user). 1322AC_DEFUN([AM_PROG_INSTALL_STRIP], 1323[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1324# Installed binaries are usually stripped using `strip' when the user 1325# run `make install-strip'. However `strip' might not be the right 1326# tool to use in cross-compilation environments, therefore Automake 1327# will honor the `STRIP' environment variable to overrule this program. 1328dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1329if test "$cross_compiling" != no; then 1330 AC_CHECK_TOOL([STRIP], [strip], :) 1331fi 1332INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1333AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1334 1335# Copyright (C) 2006 Free Software Foundation, Inc. 1336# 1337# This file is free software; the Free Software Foundation 1338# gives unlimited permission to copy and/or distribute it, 1339# with or without modifications, as long as this notice is preserved. 1340 1341# _AM_SUBST_NOTMAKE(VARIABLE) 1342# --------------------------- 1343# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. 1344# This macro is traced by Automake. 1345AC_DEFUN([_AM_SUBST_NOTMAKE]) 1346 1347# Check how to create a tarball. -*- Autoconf -*- 1348 1349# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1350# 1351# This file is free software; the Free Software Foundation 1352# gives unlimited permission to copy and/or distribute it, 1353# with or without modifications, as long as this notice is preserved. 1354 1355# serial 2 1356 1357# _AM_PROG_TAR(FORMAT) 1358# -------------------- 1359# Check how to create a tarball in format FORMAT. 1360# FORMAT should be one of `v7', `ustar', or `pax'. 1361# 1362# Substitute a variable $(am__tar) that is a command 1363# writing to stdout a FORMAT-tarball containing the directory 1364# $tardir. 1365# tardir=directory && $(am__tar) > result.tar 1366# 1367# Substitute a variable $(am__untar) that extract such 1368# a tarball read from stdin. 1369# $(am__untar) < result.tar 1370AC_DEFUN([_AM_PROG_TAR], 1371[# Always define AMTAR for backward compatibility. 1372AM_MISSING_PROG([AMTAR], [tar]) 1373m4_if([$1], [v7], 1374 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1375 [m4_case([$1], [ustar],, [pax],, 1376 [m4_fatal([Unknown tar format])]) 1377AC_MSG_CHECKING([how to create a $1 tar archive]) 1378# Loop over all known methods to create a tar archive until one works. 1379_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1380_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1381# Do not fold the above two line into one, because Tru64 sh and 1382# Solaris sh will not grok spaces in the rhs of `-'. 1383for _am_tool in $_am_tools 1384do 1385 case $_am_tool in 1386 gnutar) 1387 for _am_tar in tar gnutar gtar; 1388 do 1389 AM_RUN_LOG([$_am_tar --version]) && break 1390 done 1391 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1392 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1393 am__untar="$_am_tar -xf -" 1394 ;; 1395 plaintar) 1396 # Must skip GNU tar: if it does not support --format= it doesn't create 1397 # ustar tarball either. 1398 (tar --version) >/dev/null 2>&1 && continue 1399 am__tar='tar chf - "$$tardir"' 1400 am__tar_='tar chf - "$tardir"' 1401 am__untar='tar xf -' 1402 ;; 1403 pax) 1404 am__tar='pax -L -x $1 -w "$$tardir"' 1405 am__tar_='pax -L -x $1 -w "$tardir"' 1406 am__untar='pax -r' 1407 ;; 1408 cpio) 1409 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1410 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1411 am__untar='cpio -i -H $1 -d' 1412 ;; 1413 none) 1414 am__tar=false 1415 am__tar_=false 1416 am__untar=false 1417 ;; 1418 esac 1419 1420 # If the value was cached, stop now. We just wanted to have am__tar 1421 # and am__untar set. 1422 test -n "${am_cv_prog_tar_$1}" && break 1423 1424 # tar/untar a dummy directory, and stop if the command works 1425 rm -rf conftest.dir 1426 mkdir conftest.dir 1427 echo GrepMe > conftest.dir/file 1428 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1429 rm -rf conftest.dir 1430 if test -s conftest.tar; then 1431 AM_RUN_LOG([$am__untar <conftest.tar]) 1432 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1433 fi 1434done 1435rm -rf conftest.dir 1436 1437AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1438AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1439AC_SUBST([am__tar]) 1440AC_SUBST([am__untar]) 1441]) # _AM_PROG_TAR 1442 1443dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1444dnl 1445dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1446dnl 1447dnl Permission is hereby granted, free of charge, to any person obtaining a 1448dnl copy of this software and associated documentation files (the 1449dnl "Software"), to deal in the Software without restriction, including 1450dnl without limitation the rights to use, copy, modify, merge, publish, 1451dnl distribute, and/or sell copies of the Software, and to permit persons 1452dnl to whom the Software is furnished to do so, provided that the above 1453dnl copyright notice(s) and this permission notice appear in all copies of 1454dnl the Software and that both the above copyright notice(s) and this 1455dnl permission notice appear in supporting documentation. 1456dnl 1457dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1458dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1459dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1460dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1461dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1462dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1463dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1464dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 1465dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1466dnl 1467dnl Except as contained in this notice, the name of a copyright holder 1468dnl shall not be used in advertising or otherwise to promote the sale, use 1469dnl or other dealings in this Software without prior written authorization 1470dnl of the copyright holder. 1471 1472# XORG_MACROS_VERSION(required-version) 1473# ------------------------------------- 1474# Minimum version: 1.1.0 1475# 1476# If you're using a macro added in Version 1.1 or newer, include this in 1477# your configure.ac with the minimum required version, such as: 1478# XORG_MACROS_VERSION(1.1) 1479# 1480# To ensure that this macro is defined, also add: 1481# m4_ifndef([XORG_MACROS_VERSION], 1482# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1483# 1484# 1485# See the "minimum version" comment for each macro you use to see what 1486# version you require. 1487m4_defun([XORG_MACROS_VERSION],[ 1488m4_define([vers_have], [1.2.2]) 1489m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1490m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1491m4_if(m4_cmp(maj_have, maj_needed), 0,, 1492 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1493m4_if(m4_version_compare(vers_have, [$1]), -1, 1494 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1495m4_undefine([vers_have]) 1496m4_undefine([maj_have]) 1497m4_undefine([maj_needed]) 1498]) # XORG_MACROS_VERSION 1499 1500# XORG_PROG_RAWCPP() 1501# ------------------ 1502# Minimum version: 1.0.0 1503# 1504# Find cpp program and necessary flags for use in pre-processing text files 1505# such as man pages and config files 1506AC_DEFUN([XORG_PROG_RAWCPP],[ 1507AC_REQUIRE([AC_PROG_CPP]) 1508AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1509 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1510 1511# Check for flag to avoid builtin definitions - assumes unix is predefined, 1512# which is not the best choice for supporting other OS'es, but covers most 1513# of the ones we need for now. 1514AC_MSG_CHECKING([if $RAWCPP requires -undef]) 1515AC_LANG_CONFTEST([Does cpp redefine unix ?]) 1516if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1517 AC_MSG_RESULT([no]) 1518else 1519 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1520 RAWCPPFLAGS=-undef 1521 AC_MSG_RESULT([yes]) 1522 # under Cygwin unix is still defined even with -undef 1523 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1524 RAWCPPFLAGS="-undef -ansi" 1525 AC_MSG_RESULT([yes, with -ansi]) 1526 else 1527 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1528 fi 1529fi 1530rm -f conftest.$ac_ext 1531 1532AC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1533AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1534if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1535 AC_MSG_RESULT([no]) 1536else 1537 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1538 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1539 AC_MSG_RESULT([yes]) 1540 else 1541 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1542 fi 1543fi 1544rm -f conftest.$ac_ext 1545AC_SUBST(RAWCPPFLAGS) 1546]) # XORG_PROG_RAWCPP 1547 1548# XORG_MANPAGE_SECTIONS() 1549# ----------------------- 1550# Minimum version: 1.0.0 1551# 1552# Determine which sections man pages go in for the different man page types 1553# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1554# Not sure if there's any better way than just hardcoding by OS name. 1555# Override default settings by setting environment variables 1556 1557AC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1558AC_REQUIRE([AC_CANONICAL_HOST]) 1559 1560if test x$APP_MAN_SUFFIX = x ; then 1561 APP_MAN_SUFFIX=1 1562fi 1563if test x$APP_MAN_DIR = x ; then 1564 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1565fi 1566 1567if test x$LIB_MAN_SUFFIX = x ; then 1568 LIB_MAN_SUFFIX=3 1569fi 1570if test x$LIB_MAN_DIR = x ; then 1571 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1572fi 1573 1574if test x$FILE_MAN_SUFFIX = x ; then 1575 case $host_os in 1576 solaris*) FILE_MAN_SUFFIX=4 ;; 1577 *) FILE_MAN_SUFFIX=5 ;; 1578 esac 1579fi 1580if test x$FILE_MAN_DIR = x ; then 1581 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1582fi 1583 1584if test x$MISC_MAN_SUFFIX = x ; then 1585 case $host_os in 1586 solaris*) MISC_MAN_SUFFIX=5 ;; 1587 *) MISC_MAN_SUFFIX=7 ;; 1588 esac 1589fi 1590if test x$MISC_MAN_DIR = x ; then 1591 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1592fi 1593 1594if test x$DRIVER_MAN_SUFFIX = x ; then 1595 case $host_os in 1596 solaris*) DRIVER_MAN_SUFFIX=7 ;; 1597 *) DRIVER_MAN_SUFFIX=4 ;; 1598 esac 1599fi 1600if test x$DRIVER_MAN_DIR = x ; then 1601 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1602fi 1603 1604if test x$ADMIN_MAN_SUFFIX = x ; then 1605 case $host_os in 1606 solaris*) ADMIN_MAN_SUFFIX=1m ;; 1607 *) ADMIN_MAN_SUFFIX=8 ;; 1608 esac 1609fi 1610if test x$ADMIN_MAN_DIR = x ; then 1611 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1612fi 1613 1614 1615AC_SUBST([APP_MAN_SUFFIX]) 1616AC_SUBST([LIB_MAN_SUFFIX]) 1617AC_SUBST([FILE_MAN_SUFFIX]) 1618AC_SUBST([MISC_MAN_SUFFIX]) 1619AC_SUBST([DRIVER_MAN_SUFFIX]) 1620AC_SUBST([ADMIN_MAN_SUFFIX]) 1621AC_SUBST([APP_MAN_DIR]) 1622AC_SUBST([LIB_MAN_DIR]) 1623AC_SUBST([FILE_MAN_DIR]) 1624AC_SUBST([MISC_MAN_DIR]) 1625AC_SUBST([DRIVER_MAN_DIR]) 1626AC_SUBST([ADMIN_MAN_DIR]) 1627]) # XORG_MANPAGE_SECTIONS 1628 1629# XORG_CHECK_LINUXDOC 1630# ------------------- 1631# Minimum version: 1.0.0 1632# 1633# Defines the variable MAKE_TEXT if the necessary tools and 1634# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1635# Whether or not the necessary tools and files are found can be checked 1636# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1637AC_DEFUN([XORG_CHECK_LINUXDOC],[ 1638if test x$XORG_SGML_PATH = x ; then 1639 XORG_SGML_PATH=$prefix/share/sgml 1640fi 1641HAVE_DEFS_ENT= 1642 1643if test x"$cross_compiling" = x"yes" ; then 1644 HAVE_DEFS_ENT=no 1645else 1646 AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1647fi 1648 1649AC_PATH_PROG(LINUXDOC, linuxdoc) 1650AC_PATH_PROG(PS2PDF, ps2pdf) 1651 1652AC_MSG_CHECKING([Whether to build documentation]) 1653 1654if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1655 BUILDDOC=yes 1656else 1657 BUILDDOC=no 1658fi 1659 1660AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1661 1662AC_MSG_RESULT([$BUILDDOC]) 1663 1664AC_MSG_CHECKING([Whether to build pdf documentation]) 1665 1666if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1667 BUILDPDFDOC=yes 1668else 1669 BUILDPDFDOC=no 1670fi 1671 1672AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1673 1674AC_MSG_RESULT([$BUILDPDFDOC]) 1675 1676MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1677MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1678MAKE_PDF="$PS2PDF" 1679MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1680 1681AC_SUBST(MAKE_TEXT) 1682AC_SUBST(MAKE_PS) 1683AC_SUBST(MAKE_PDF) 1684AC_SUBST(MAKE_HTML) 1685]) # XORG_CHECK_LINUXDOC 1686 1687# XORG_CHECK_DOCBOOK 1688# ------------------- 1689# Minimum version: 1.0.0 1690# 1691# Checks for the ability to build output formats from SGML DocBook source. 1692# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1693# indicates whether the necessary tools and files are found and, if set, 1694# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1695AC_DEFUN([XORG_CHECK_DOCBOOK],[ 1696if test x$XORG_SGML_PATH = x ; then 1697 XORG_SGML_PATH=$prefix/share/sgml 1698fi 1699HAVE_DEFS_ENT= 1700BUILDTXTDOC=no 1701BUILDPDFDOC=no 1702BUILDPSDOC=no 1703BUILDHTMLDOC=no 1704 1705AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1706 1707AC_PATH_PROG(DOCBOOKPS, docbook2ps) 1708AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1709AC_PATH_PROG(DOCBOOKHTML, docbook2html) 1710AC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1711 1712AC_MSG_CHECKING([Whether to build text documentation]) 1713if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1714 test x$BUILD_TXTDOC != xno; then 1715 BUILDTXTDOC=yes 1716fi 1717AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1718AC_MSG_RESULT([$BUILDTXTDOC]) 1719 1720AC_MSG_CHECKING([Whether to build PDF documentation]) 1721if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1722 test x$BUILD_PDFDOC != xno; then 1723 BUILDPDFDOC=yes 1724fi 1725AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1726AC_MSG_RESULT([$BUILDPDFDOC]) 1727 1728AC_MSG_CHECKING([Whether to build PostScript documentation]) 1729if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1730 test x$BUILD_PSDOC != xno; then 1731 BUILDPSDOC=yes 1732fi 1733AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1734AC_MSG_RESULT([$BUILDPSDOC]) 1735 1736AC_MSG_CHECKING([Whether to build HTML documentation]) 1737if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1738 test x$BUILD_HTMLDOC != xno; then 1739 BUILDHTMLDOC=yes 1740fi 1741AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1742AC_MSG_RESULT([$BUILDHTMLDOC]) 1743 1744MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1745MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1746MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1747MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1748 1749AC_SUBST(MAKE_TEXT) 1750AC_SUBST(MAKE_PS) 1751AC_SUBST(MAKE_PDF) 1752AC_SUBST(MAKE_HTML) 1753]) # XORG_CHECK_DOCBOOK 1754 1755# XORG_CHECK_MALLOC_ZERO 1756# ---------------------- 1757# Minimum version: 1.0.0 1758# 1759# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1760# malloc(0) returns NULL. Packages should add one of these cflags to 1761# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1762AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1763AC_ARG_ENABLE(malloc0returnsnull, 1764 AC_HELP_STRING([--enable-malloc0returnsnull], 1765 [malloc(0) returns NULL (default: auto)]), 1766 [MALLOC_ZERO_RETURNS_NULL=$enableval], 1767 [MALLOC_ZERO_RETURNS_NULL=auto]) 1768 1769AC_MSG_CHECKING([whether malloc(0) returns NULL]) 1770if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1771 AC_RUN_IFELSE([ 1772char *malloc(); 1773char *realloc(); 1774char *calloc(); 1775main() { 1776 char *m0, *r0, *c0, *p; 1777 m0 = malloc(0); 1778 p = malloc(10); 1779 r0 = realloc(p,0); 1780 c0 = calloc(0); 1781 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1782}], 1783 [MALLOC_ZERO_RETURNS_NULL=yes], 1784 [MALLOC_ZERO_RETURNS_NULL=no]) 1785fi 1786AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1787 1788if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1789 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1790 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1791 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1792else 1793 MALLOC_ZERO_CFLAGS="" 1794 XMALLOC_ZERO_CFLAGS="" 1795 XTMALLOC_ZERO_CFLAGS="" 1796fi 1797 1798AC_SUBST([MALLOC_ZERO_CFLAGS]) 1799AC_SUBST([XMALLOC_ZERO_CFLAGS]) 1800AC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1801]) # XORG_CHECK_MALLOC_ZERO 1802 1803# XORG_WITH_LINT() 1804# ---------------- 1805# Minimum version: 1.1.0 1806# 1807# Sets up flags for source checkers such as lint and sparse if --with-lint 1808# is specified. (Use --with-lint=sparse for sparse.) 1809# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1810# Sets $LINT_FLAGS to flags to pass to source checker 1811# Sets LINT automake conditional if enabled (default: disabled) 1812# 1813AC_DEFUN([XORG_WITH_LINT],[ 1814 1815# Allow checking code with lint, sparse, etc. 1816AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 1817 [Use a lint-style source code checker (default: disabled)])], 1818 [use_lint=$withval], [use_lint=no]) 1819if test "x$use_lint" = "xyes" ; then 1820 LINT="lint" 1821else 1822 LINT="$use_lint" 1823fi 1824if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1825 case $LINT in 1826 lint|*/lint) 1827 case $host_os in 1828 solaris*) 1829 LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1830 ;; 1831 esac 1832 ;; 1833 esac 1834fi 1835 1836AC_SUBST(LINT) 1837AC_SUBST(LINT_FLAGS) 1838AM_CONDITIONAL(LINT, [test x$LINT != xno]) 1839 1840]) # XORG_WITH_LINT 1841 1842# XORG_LINT_LIBRARY(LIBNAME) 1843# -------------------------- 1844# Minimum version: 1.1.0 1845# 1846# Sets up flags for building lint libraries for checking programs that call 1847# functions in the library. 1848# Disabled by default, enable with --enable-lint-library 1849# Sets: 1850# @LINTLIB@ - name of lint library file to make 1851# MAKE_LINT_LIB - automake conditional 1852# 1853 1854AC_DEFUN([XORG_LINT_LIBRARY],[ 1855AC_REQUIRE([XORG_WITH_LINT]) 1856# Build lint "library" for more indepth checks of programs calling this library 1857AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 1858 [Create lint library (default: disabled)])], 1859 [make_lint_lib=$enableval], [make_lint_lib=no]) 1860if test "x$make_lint_lib" != "xno" ; then 1861 if test "x$LINT" = "xno" ; then 1862 AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1863 fi 1864 if test "x$make_lint_lib" = "xyes" ; then 1865 LINTLIB=llib-l$1.ln 1866 else 1867 LINTLIB=$make_lint_lib 1868 fi 1869fi 1870AC_SUBST(LINTLIB) 1871AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1872 1873]) # XORG_LINT_LIBRARY 1874 1875# XORG_CWARNFLAGS 1876# --------------- 1877# Minimum version: 1.2.0 1878# 1879# Defines CWARNFLAGS to enable C compiler warnings. 1880# 1881AC_DEFUN([XORG_CWARNFLAGS], [ 1882AC_REQUIRE([AC_PROG_CC]) 1883if test "x$GCC" = xyes ; then 1884 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1885-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1886-Wbad-function-cast" 1887 case `$CC -dumpversion` in 1888 3.4.* | 4.*) 1889 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1890 ;; 1891 esac 1892else 1893 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1894 if test "x$SUNCC" = "xyes"; then 1895 CWARNFLAGS="-v" 1896 fi 1897fi 1898AC_SUBST(CWARNFLAGS) 1899]) # XORG_CWARNFLAGS 1900dnl Copyright 2005 Red Hat, Inc 1901dnl 1902dnl Permission to use, copy, modify, distribute, and sell this software and its 1903dnl documentation for any purpose is hereby granted without fee, provided that 1904dnl the above copyright notice appear in all copies and that both that 1905dnl copyright notice and this permission notice appear in supporting 1906dnl documentation. 1907dnl 1908dnl The above copyright notice and this permission notice shall be included 1909dnl in all copies or substantial portions of the Software. 1910dnl 1911dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1912dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1913dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1914dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1915dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1916dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1917dnl OTHER DEALINGS IN THE SOFTWARE. 1918dnl 1919dnl Except as contained in this notice, the name of the copyright holders shall 1920dnl not be used in advertising or otherwise to promote the sale, use or 1921dnl other dealings in this Software without prior written authorization 1922dnl from the copyright holders. 1923dnl 1924 1925# XORG_RELEASE_VERSION 1926# -------------------- 1927# Adds --with/without-release-string and changes the PACKAGE and 1928# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1929# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1930# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1931 1932AC_DEFUN([XORG_RELEASE_VERSION],[ 1933 AC_ARG_WITH(release-version, 1934 AC_HELP_STRING([--with-release-version=STRING], 1935 [Use release version string in package name]), 1936 [RELEASE_VERSION="$withval"], 1937 [RELEASE_VERSION=""]) 1938 if test "x$RELEASE_VERSION" != "x"; then 1939 PACKAGE="$PACKAGE-$RELEASE_VERSION" 1940 PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1941 AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1942 fi 1943 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1944 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1945 [Major version of this package]) 1946 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1947 if test "x$PVM" = "x"; then 1948 PVM="0" 1949 fi 1950 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1951 [$PVM], 1952 [Minor version of this package]) 1953 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1954 if test "x$PVP" = "x"; then 1955 PVP="0" 1956 fi 1957 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1958 [$PVP], 1959 [Patch version of this package]) 1960]) 1961 1962# XORG_CHANGELOG() 1963# ---------------- 1964# Minimum version: 1.2.0 1965# 1966# Defines the variable CHANGELOG_CMD as the command to generate 1967# ChangeLog from git. 1968# 1969# Arrange that distcleancheck ignores ChangeLog left over by distclean. 1970# 1971AC_DEFUN([XORG_CHANGELOG], [ 1972CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 1973mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 1974echo 'git directory not found: installing possibly empty changelog.' >&2)" 1975AC_SUBST([CHANGELOG_CMD]) 1976AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 1977]) # XORG_CHANGELOG 1978 1979dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 1980dnl 1981dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 1982dnl 1983dnl Permission to use, copy, modify, distribute, and sell this software and its 1984dnl documentation for any purpose is hereby granted without fee, provided that 1985dnl the above copyright notice appear in all copies and that both that 1986dnl copyright notice and this permission notice appear in supporting 1987dnl documentation. 1988dnl 1989dnl The above copyright notice and this permission notice shall be included 1990dnl in all copies or substantial portions of the Software. 1991dnl 1992dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1993dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1994dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1995dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1996dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1997dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1998dnl OTHER DEALINGS IN THE SOFTWARE. 1999dnl 2000dnl Except as contained in this notice, the name of the copyright holders shall 2001dnl not be used in advertising or otherwise to promote the sale, use or 2002dnl other dealings in this Software without prior written authorization 2003dnl from the copyright holders. 2004dnl 2005 2006# XTRANS_TCP_FLAGS() 2007# ------------------ 2008# Find needed libraries for TCP sockets, and check for IPv6 support 2009AC_DEFUN([XTRANS_TCP_FLAGS],[ 2010 # SVR4 hides these in libraries other than libc 2011 AC_SEARCH_LIBS(socket, [socket]) 2012 AC_SEARCH_LIBS(gethostbyname, [nsl]) 2013 AC_HAVE_LIBRARY([ws2_32]) 2014 2015 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 2016 AC_ARG_ENABLE(ipv6, 2017 AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 2018 [IPV6CONN=$enableval], 2019 [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 2020 AC_MSG_CHECKING([if IPv6 support should be built]) 2021 if test "$IPV6CONN" = "yes"; then 2022 AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 2023 fi 2024 AC_MSG_RESULT($IPV6CONN) 2025 2026 # 4.3BSD-Reno added a new member to struct sockaddr_in 2027 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 2028 AC_DEFINE([BSD44SOCKETS],1, 2029 [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 2030#include <sys/types.h> 2031#include <sys/socket.h> 2032#include <netinet/in.h> 2033 ]) 2034 2035 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 2036 AC_CHECK_TYPES([socklen_t], [], [], [ 2037AC_INCLUDES_DEFAULT 2038#include <sys/socket.h>]) 2039 2040]) # XTRANS_TCP_FLAGS 2041 2042# XTRANS_CONNECTION_FLAGS() 2043# ------------------------- 2044# Standard checks for which Xtrans transports to use by the Xorg packages 2045# that use Xtrans functions 2046AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 2047 AC_REQUIRE([AC_CANONICAL_HOST]) 2048 AC_REQUIRE([AC_TYPE_SIGNAL]) 2049 [case $host_os in 2050 mingw*) unixdef="no" ;; 2051 *) unixdef="yes" ;; 2052 esac] 2053 AC_ARG_ENABLE(unix-transport, 2054 AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 2055 [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 2056 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 2057 if test "$UNIXCONN" = "yes"; then 2058 AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 2059 fi 2060 AC_MSG_RESULT($UNIXCONN) 2061 AC_ARG_ENABLE(tcp-transport, 2062 AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 2063 [TCPCONN=$enableval], [TCPCONN=yes]) 2064 AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 2065 AC_MSG_RESULT($TCPCONN) 2066 if test "$TCPCONN" = "yes"; then 2067 AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 2068 XTRANS_TCP_FLAGS 2069 fi 2070 [case $host_os in 2071 solaris*|sco*|sysv4*) localdef="yes" ;; 2072 *) localdef="no" ;; 2073 esac] 2074 AC_ARG_ENABLE(local-transport, 2075 AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 2076 [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 2077 AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 2078 AC_MSG_RESULT($LOCALCONN) 2079 if test "$LOCALCONN" = "yes"; then 2080 AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 2081 fi 2082 2083]) # XTRANS_CONNECTION_FLAGS 2084 2085 2086# XTRANS_SECURE_RPC_FLAGS() 2087# ------------------------- 2088# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 2089# so that any necessary networking libraries are already found 2090AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 2091[AC_REQUIRE([XTRANS_TCP_FLAGS]) 2092 AC_ARG_ENABLE(secure-rpc, 2093 AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 2094 [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 2095 2096 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 2097 FOUND_SECURE_RPC="no" 2098 AC_CHECK_FUNCS([authdes_seccreate authdes_create], 2099 [FOUND_SECURE_RPC="yes"]) 2100 if test "x$FOUND_SECURE_RPC" = "xno" ; then 2101 if test "x$SECURE_RPC" = "xyes" ; then 2102 AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 2103 fi 2104 SECURE_RPC="no" 2105 else 2106 dnl FreeBSD keeps getsecretkey in librpcsvc 2107 AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 2108 SECURE_RPC="yes" 2109 fi 2110 fi 2111 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 2112 if test "x$SECURE_RPC" = "xyes" ; then 2113 AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 2114 fi 2115 AC_MSG_RESULT($SECURE_RPC) 2116]) # XTRANS_SECURE_RPC_FLAGS 2117 2118 2119# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2120 2121# serial 48 AC_PROG_LIBTOOL 2122 2123 2124# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 2125# ----------------------------------------------------------- 2126# If this macro is not defined by Autoconf, define it here. 2127m4_ifdef([AC_PROVIDE_IFELSE], 2128 [], 2129 [m4_define([AC_PROVIDE_IFELSE], 2130 [m4_ifdef([AC_PROVIDE_$1], 2131 [$2], [$3])])]) 2132 2133 2134# AC_PROG_LIBTOOL 2135# --------------- 2136AC_DEFUN([AC_PROG_LIBTOOL], 2137[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 2138dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 2139dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 2140 AC_PROVIDE_IFELSE([AC_PROG_CXX], 2141 [AC_LIBTOOL_CXX], 2142 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 2143 ])]) 2144dnl And a similar setup for Fortran 77 support 2145 AC_PROVIDE_IFELSE([AC_PROG_F77], 2146 [AC_LIBTOOL_F77], 2147 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 2148])]) 2149 2150dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 2151dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 2152dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 2153 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 2154 [AC_LIBTOOL_GCJ], 2155 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2156 [AC_LIBTOOL_GCJ], 2157 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 2158 [AC_LIBTOOL_GCJ], 2159 [ifdef([AC_PROG_GCJ], 2160 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 2161 ifdef([A][M_PROG_GCJ], 2162 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 2163 ifdef([LT_AC_PROG_GCJ], 2164 [define([LT_AC_PROG_GCJ], 2165 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 2166])])# AC_PROG_LIBTOOL 2167 2168 2169# _AC_PROG_LIBTOOL 2170# ---------------- 2171AC_DEFUN([_AC_PROG_LIBTOOL], 2172[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 2173AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 2174AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 2175AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 2176 2177# This can be used to rebuild libtool when needed 2178LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 2179 2180# Always use our own libtool. 2181LIBTOOL='$(SHELL) $(top_builddir)/libtool' 2182AC_SUBST(LIBTOOL)dnl 2183 2184# Prevent multiple expansion 2185define([AC_PROG_LIBTOOL], []) 2186])# _AC_PROG_LIBTOOL 2187 2188 2189# AC_LIBTOOL_SETUP 2190# ---------------- 2191AC_DEFUN([AC_LIBTOOL_SETUP], 2192[AC_PREREQ(2.50)dnl 2193AC_REQUIRE([AC_ENABLE_SHARED])dnl 2194AC_REQUIRE([AC_ENABLE_STATIC])dnl 2195AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 2196AC_REQUIRE([AC_CANONICAL_HOST])dnl 2197AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2198AC_REQUIRE([AC_PROG_CC])dnl 2199AC_REQUIRE([AC_PROG_LD])dnl 2200AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 2201AC_REQUIRE([AC_PROG_NM])dnl 2202 2203AC_REQUIRE([AC_PROG_LN_S])dnl 2204AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 2205# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 2206AC_REQUIRE([AC_OBJEXT])dnl 2207AC_REQUIRE([AC_EXEEXT])dnl 2208dnl 2209 2210AC_LIBTOOL_SYS_MAX_CMD_LEN 2211AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 2212AC_LIBTOOL_OBJDIR 2213 2214AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 2215_LT_AC_PROG_ECHO_BACKSLASH 2216 2217case $host_os in 2218aix3*) 2219 # AIX sometimes has problems with the GCC collect2 program. For some 2220 # reason, if we set the COLLECT_NAMES environment variable, the problems 2221 # vanish in a puff of smoke. 2222 if test "X${COLLECT_NAMES+set}" != Xset; then 2223 COLLECT_NAMES= 2224 export COLLECT_NAMES 2225 fi 2226 ;; 2227esac 2228 2229# Sed substitution that helps us do robust quoting. It backslashifies 2230# metacharacters that are still active within double-quoted strings. 2231Xsed='sed -e 1s/^X//' 2232[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 2233 2234# Same as above, but do not quote variable references. 2235[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 2236 2237# Sed substitution to delay expansion of an escaped shell variable in a 2238# double_quote_subst'ed string. 2239delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2240 2241# Sed substitution to avoid accidental globbing in evaled expressions 2242no_glob_subst='s/\*/\\\*/g' 2243 2244# Constants: 2245rm="rm -f" 2246 2247# Global variables: 2248default_ofile=libtool 2249can_build_shared=yes 2250 2251# All known linkers require a `.a' archive for static linking (except MSVC, 2252# which needs '.lib'). 2253libext=a 2254ltmain="$ac_aux_dir/ltmain.sh" 2255ofile="$default_ofile" 2256with_gnu_ld="$lt_cv_prog_gnu_ld" 2257 2258AC_CHECK_TOOL(AR, ar, false) 2259AC_CHECK_TOOL(RANLIB, ranlib, :) 2260AC_CHECK_TOOL(STRIP, strip, :) 2261 2262old_CC="$CC" 2263old_CFLAGS="$CFLAGS" 2264 2265# Set sane defaults for various variables 2266test -z "$AR" && AR=ar 2267test -z "$AR_FLAGS" && AR_FLAGS=cru 2268test -z "$AS" && AS=as 2269test -z "$CC" && CC=cc 2270test -z "$LTCC" && LTCC=$CC 2271test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2272test -z "$DLLTOOL" && DLLTOOL=dlltool 2273test -z "$LD" && LD=ld 2274test -z "$LN_S" && LN_S="ln -s" 2275test -z "$MAGIC_CMD" && MAGIC_CMD=file 2276test -z "$NM" && NM=nm 2277test -z "$SED" && SED=sed 2278test -z "$OBJDUMP" && OBJDUMP=objdump 2279test -z "$RANLIB" && RANLIB=: 2280test -z "$STRIP" && STRIP=: 2281test -z "$ac_objext" && ac_objext=o 2282 2283# Determine commands to create old-style static archives. 2284old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 2285old_postinstall_cmds='chmod 644 $oldlib' 2286old_postuninstall_cmds= 2287 2288if test -n "$RANLIB"; then 2289 case $host_os in 2290 openbsd*) 2291 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 2292 ;; 2293 *) 2294 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 2295 ;; 2296 esac 2297 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2298fi 2299 2300_LT_CC_BASENAME([$compiler]) 2301 2302# Only perform the check for file, if the check method requires it 2303case $deplibs_check_method in 2304file_magic*) 2305 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2306 AC_PATH_MAGIC 2307 fi 2308 ;; 2309esac 2310 2311AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 2312AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2313enable_win32_dll=yes, enable_win32_dll=no) 2314 2315AC_ARG_ENABLE([libtool-lock], 2316 [AC_HELP_STRING([--disable-libtool-lock], 2317 [avoid locking (might break parallel builds)])]) 2318test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2319 2320AC_ARG_WITH([pic], 2321 [AC_HELP_STRING([--with-pic], 2322 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 2323 [pic_mode="$withval"], 2324 [pic_mode=default]) 2325test -z "$pic_mode" && pic_mode=default 2326 2327# Use C for the default configuration in the libtool script 2328tagname= 2329AC_LIBTOOL_LANG_C_CONFIG 2330_LT_AC_TAGCONFIG 2331])# AC_LIBTOOL_SETUP 2332 2333 2334# _LT_AC_SYS_COMPILER 2335# ------------------- 2336AC_DEFUN([_LT_AC_SYS_COMPILER], 2337[AC_REQUIRE([AC_PROG_CC])dnl 2338 2339# If no C compiler was specified, use CC. 2340LTCC=${LTCC-"$CC"} 2341 2342# If no C compiler flags were specified, use CFLAGS. 2343LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2344 2345# Allow CC to be a program name with arguments. 2346compiler=$CC 2347])# _LT_AC_SYS_COMPILER 2348 2349 2350# _LT_CC_BASENAME(CC) 2351# ------------------- 2352# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2353AC_DEFUN([_LT_CC_BASENAME], 2354[for cc_temp in $1""; do 2355 case $cc_temp in 2356 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2357 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2358 \-*) ;; 2359 *) break;; 2360 esac 2361done 2362cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 2363]) 2364 2365 2366# _LT_COMPILER_BOILERPLATE 2367# ------------------------ 2368# Check for compiler boilerplate output or warnings with 2369# the simple compiler test code. 2370AC_DEFUN([_LT_COMPILER_BOILERPLATE], 2371[ac_outfile=conftest.$ac_objext 2372printf "$lt_simple_compile_test_code" >conftest.$ac_ext 2373eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2374_lt_compiler_boilerplate=`cat conftest.err` 2375$rm conftest* 2376])# _LT_COMPILER_BOILERPLATE 2377 2378 2379# _LT_LINKER_BOILERPLATE 2380# ---------------------- 2381# Check for linker boilerplate output or warnings with 2382# the simple link test code. 2383AC_DEFUN([_LT_LINKER_BOILERPLATE], 2384[ac_outfile=conftest.$ac_objext 2385printf "$lt_simple_link_test_code" >conftest.$ac_ext 2386eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2387_lt_linker_boilerplate=`cat conftest.err` 2388$rm conftest* 2389])# _LT_LINKER_BOILERPLATE 2390 2391 2392# _LT_AC_SYS_LIBPATH_AIX 2393# ---------------------- 2394# Links a minimal program and checks the executable 2395# for the system default hardcoded library path. In most cases, 2396# this is /usr/lib:/lib, but when the MPI compilers are used 2397# the location of the communication and MPI libs are included too. 2398# If we don't find anything, use the default library path according 2399# to the aix ld manual. 2400AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 2401[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 2402aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 2403}'` 2404# Check for a 64-bit object if we didn't find anything. 2405if 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; } 2406}'`; fi],[]) 2407if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 2408])# _LT_AC_SYS_LIBPATH_AIX 2409 2410 2411# _LT_AC_SHELL_INIT(ARG) 2412# ---------------------- 2413AC_DEFUN([_LT_AC_SHELL_INIT], 2414[ifdef([AC_DIVERSION_NOTICE], 2415 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 2416 [AC_DIVERT_PUSH(NOTICE)]) 2417$1 2418AC_DIVERT_POP 2419])# _LT_AC_SHELL_INIT 2420 2421 2422# _LT_AC_PROG_ECHO_BACKSLASH 2423# -------------------------- 2424# Add some code to the start of the generated configure script which 2425# will find an echo command which doesn't interpret backslashes. 2426AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 2427[_LT_AC_SHELL_INIT([ 2428# Check that we are running under the correct shell. 2429SHELL=${CONFIG_SHELL-/bin/sh} 2430 2431case X$ECHO in 2432X*--fallback-echo) 2433 # Remove one level of quotation (which was required for Make). 2434 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 2435 ;; 2436esac 2437 2438echo=${ECHO-echo} 2439if test "X[$]1" = X--no-reexec; then 2440 # Discard the --no-reexec flag, and continue. 2441 shift 2442elif test "X[$]1" = X--fallback-echo; then 2443 # Avoid inline document here, it may be left over 2444 : 2445elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 2446 # Yippee, $echo works! 2447 : 2448else 2449 # Restart under the correct shell. 2450 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 2451fi 2452 2453if test "X[$]1" = X--fallback-echo; then 2454 # used as fallback echo 2455 shift 2456 cat <<EOF 2457[$]* 2458EOF 2459 exit 0 2460fi 2461 2462# The HP-UX ksh and POSIX shell print the target directory to stdout 2463# if CDPATH is set. 2464(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2465 2466if test -z "$ECHO"; then 2467if test "X${echo_test_string+set}" != Xset; then 2468# find a string as large as possible, as long as the shell can cope with it 2469 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 2470 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 2471 if (echo_test_string=`eval $cmd`) 2>/dev/null && 2472 echo_test_string=`eval $cmd` && 2473 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 2474 then 2475 break 2476 fi 2477 done 2478fi 2479 2480if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 2481 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 2482 test "X$echo_testing_string" = "X$echo_test_string"; then 2483 : 2484else 2485 # The Solaris, AIX, and Digital Unix default echo programs unquote 2486 # backslashes. This makes it impossible to quote backslashes using 2487 # echo "$something" | sed 's/\\/\\\\/g' 2488 # 2489 # So, first we look for a working echo in the user's PATH. 2490 2491 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2492 for dir in $PATH /usr/ucb; do 2493 IFS="$lt_save_ifs" 2494 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 2495 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 2496 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 2497 test "X$echo_testing_string" = "X$echo_test_string"; then 2498 echo="$dir/echo" 2499 break 2500 fi 2501 done 2502 IFS="$lt_save_ifs" 2503 2504 if test "X$echo" = Xecho; then 2505 # We didn't find a better echo, so look for alternatives. 2506 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 2507 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 2508 test "X$echo_testing_string" = "X$echo_test_string"; then 2509 # This shell has a builtin print -r that does the trick. 2510 echo='print -r' 2511 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 2512 test "X$CONFIG_SHELL" != X/bin/ksh; then 2513 # If we have ksh, try running configure again with it. 2514 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 2515 export ORIGINAL_CONFIG_SHELL 2516 CONFIG_SHELL=/bin/ksh 2517 export CONFIG_SHELL 2518 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 2519 else 2520 # Try using printf. 2521 echo='printf %s\n' 2522 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 2523 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 2524 test "X$echo_testing_string" = "X$echo_test_string"; then 2525 # Cool, printf works 2526 : 2527 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 2528 test "X$echo_testing_string" = 'X\t' && 2529 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 2530 test "X$echo_testing_string" = "X$echo_test_string"; then 2531 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 2532 export CONFIG_SHELL 2533 SHELL="$CONFIG_SHELL" 2534 export SHELL 2535 echo="$CONFIG_SHELL [$]0 --fallback-echo" 2536 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 2537 test "X$echo_testing_string" = 'X\t' && 2538 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 2539 test "X$echo_testing_string" = "X$echo_test_string"; then 2540 echo="$CONFIG_SHELL [$]0 --fallback-echo" 2541 else 2542 # maybe with a smaller string... 2543 prev=: 2544 2545 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 2546 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 2547 then 2548 break 2549 fi 2550 prev="$cmd" 2551 done 2552 2553 if test "$prev" != 'sed 50q "[$]0"'; then 2554 echo_test_string=`eval $prev` 2555 export echo_test_string 2556 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 2557 else 2558 # Oops. We lost completely, so just stick with echo. 2559 echo=echo 2560 fi 2561 fi 2562 fi 2563 fi 2564fi 2565fi 2566 2567# Copy echo and quote the copy suitably for passing to libtool from 2568# the Makefile, instead of quoting the original, which is used later. 2569ECHO=$echo 2570if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 2571 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 2572fi 2573 2574AC_SUBST(ECHO) 2575])])# _LT_AC_PROG_ECHO_BACKSLASH 2576 2577 2578# _LT_AC_LOCK 2579# ----------- 2580AC_DEFUN([_LT_AC_LOCK], 2581[AC_ARG_ENABLE([libtool-lock], 2582 [AC_HELP_STRING([--disable-libtool-lock], 2583 [avoid locking (might break parallel builds)])]) 2584test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2585 2586# Some flags need to be propagated to the compiler or linker for good 2587# libtool support. 2588case $host in 2589ia64-*-hpux*) 2590 # Find out which ABI we are using. 2591 echo 'int i;' > conftest.$ac_ext 2592 if AC_TRY_EVAL(ac_compile); then 2593 case `/usr/bin/file conftest.$ac_objext` in 2594 *ELF-32*) 2595 HPUX_IA64_MODE="32" 2596 ;; 2597 *ELF-64*) 2598 HPUX_IA64_MODE="64" 2599 ;; 2600 esac 2601 fi 2602 rm -rf conftest* 2603 ;; 2604*-*-irix6*) 2605 # Find out which ABI we are using. 2606 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 2607 if AC_TRY_EVAL(ac_compile); then 2608 if test "$lt_cv_prog_gnu_ld" = yes; then 2609 case `/usr/bin/file conftest.$ac_objext` in 2610 *32-bit*) 2611 LD="${LD-ld} -melf32bsmip" 2612 ;; 2613 *N32*) 2614 LD="${LD-ld} -melf32bmipn32" 2615 ;; 2616 *64-bit*) 2617 LD="${LD-ld} -melf64bmip" 2618 ;; 2619 esac 2620 else 2621 case `/usr/bin/file conftest.$ac_objext` in 2622 *32-bit*) 2623 LD="${LD-ld} -32" 2624 ;; 2625 *N32*) 2626 LD="${LD-ld} -n32" 2627 ;; 2628 *64-bit*) 2629 LD="${LD-ld} -64" 2630 ;; 2631 esac 2632 fi 2633 fi 2634 rm -rf conftest* 2635 ;; 2636 2637x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 2638 # Find out which ABI we are using. 2639 echo 'int i;' > conftest.$ac_ext 2640 if AC_TRY_EVAL(ac_compile); then 2641 case `/usr/bin/file conftest.o` in 2642 *32-bit*) 2643 case $host in 2644 x86_64-*linux*) 2645 LD="${LD-ld} -m elf_i386" 2646 ;; 2647 ppc64-*linux*|powerpc64-*linux*) 2648 LD="${LD-ld} -m elf32ppclinux" 2649 ;; 2650 s390x-*linux*) 2651 LD="${LD-ld} -m elf_s390" 2652 ;; 2653 sparc64-*linux*) 2654 LD="${LD-ld} -m elf32_sparc" 2655 ;; 2656 esac 2657 ;; 2658 *64-bit*) 2659 case $host in 2660 x86_64-*linux*) 2661 LD="${LD-ld} -m elf_x86_64" 2662 ;; 2663 ppc*-*linux*|powerpc*-*linux*) 2664 LD="${LD-ld} -m elf64ppc" 2665 ;; 2666 s390*-*linux*) 2667 LD="${LD-ld} -m elf64_s390" 2668 ;; 2669 sparc*-*linux*) 2670 LD="${LD-ld} -m elf64_sparc" 2671 ;; 2672 esac 2673 ;; 2674 esac 2675 fi 2676 rm -rf conftest* 2677 ;; 2678 2679*-*-sco3.2v5*) 2680 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2681 SAVE_CFLAGS="$CFLAGS" 2682 CFLAGS="$CFLAGS -belf" 2683 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2684 [AC_LANG_PUSH(C) 2685 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2686 AC_LANG_POP]) 2687 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2688 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2689 CFLAGS="$SAVE_CFLAGS" 2690 fi 2691 ;; 2692sparc*-*solaris*) 2693 # Find out which ABI we are using. 2694 echo 'int i;' > conftest.$ac_ext 2695 if AC_TRY_EVAL(ac_compile); then 2696 case `/usr/bin/file conftest.o` in 2697 *64-bit*) 2698 case $lt_cv_prog_gnu_ld in 2699 yes*) LD="${LD-ld} -m elf64_sparc" ;; 2700 *) LD="${LD-ld} -64" ;; 2701 esac 2702 ;; 2703 esac 2704 fi 2705 rm -rf conftest* 2706 ;; 2707 2708AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 2709[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 2710 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 2711 AC_CHECK_TOOL(AS, as, false) 2712 AC_CHECK_TOOL(OBJDUMP, objdump, false) 2713 ;; 2714 ]) 2715esac 2716 2717need_locks="$enable_libtool_lock" 2718 2719])# _LT_AC_LOCK 2720 2721 2722# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2723# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2724# ---------------------------------------------------------------- 2725# Check whether the given compiler option works 2726AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 2727[AC_REQUIRE([LT_AC_PROG_SED]) 2728AC_CACHE_CHECK([$1], [$2], 2729 [$2=no 2730 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2731 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 2732 lt_compiler_flag="$3" 2733 # Insert the option either (1) after the last *FLAGS variable, or 2734 # (2) before a word containing "conftest.", or (3) at the end. 2735 # Note that $ac_compile itself does not contain backslashes and begins 2736 # with a dollar sign (not a hyphen), so the echo should work correctly. 2737 # The option is referenced via a variable to avoid confusing sed. 2738 lt_compile=`echo "$ac_compile" | $SED \ 2739 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2740 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2741 -e 's:$: $lt_compiler_flag:'` 2742 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2743 (eval "$lt_compile" 2>conftest.err) 2744 ac_status=$? 2745 cat conftest.err >&AS_MESSAGE_LOG_FD 2746 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2747 if (exit $ac_status) && test -s "$ac_outfile"; then 2748 # The compiler can only warn and ignore the option if not recognized 2749 # So say no if there are warnings other than the usual output. 2750 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 2751 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2752 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2753 $2=yes 2754 fi 2755 fi 2756 $rm conftest* 2757]) 2758 2759if test x"[$]$2" = xyes; then 2760 ifelse([$5], , :, [$5]) 2761else 2762 ifelse([$6], , :, [$6]) 2763fi 2764])# AC_LIBTOOL_COMPILER_OPTION 2765 2766 2767# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2768# [ACTION-SUCCESS], [ACTION-FAILURE]) 2769# ------------------------------------------------------------ 2770# Check whether the given compiler option works 2771AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 2772[AC_CACHE_CHECK([$1], [$2], 2773 [$2=no 2774 save_LDFLAGS="$LDFLAGS" 2775 LDFLAGS="$LDFLAGS $3" 2776 printf "$lt_simple_link_test_code" > conftest.$ac_ext 2777 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2778 # The linker can only warn and ignore the option if not recognized 2779 # So say no if there are warnings 2780 if test -s conftest.err; then 2781 # Append any errors to the config.log. 2782 cat conftest.err 1>&AS_MESSAGE_LOG_FD 2783 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 2784 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2785 if diff conftest.exp conftest.er2 >/dev/null; then 2786 $2=yes 2787 fi 2788 else 2789 $2=yes 2790 fi 2791 fi 2792 $rm conftest* 2793 LDFLAGS="$save_LDFLAGS" 2794]) 2795 2796if test x"[$]$2" = xyes; then 2797 ifelse([$4], , :, [$4]) 2798else 2799 ifelse([$5], , :, [$5]) 2800fi 2801])# AC_LIBTOOL_LINKER_OPTION 2802 2803 2804# AC_LIBTOOL_SYS_MAX_CMD_LEN 2805# -------------------------- 2806AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 2807[# find the maximum length of command line arguments 2808AC_MSG_CHECKING([the maximum length of command line arguments]) 2809AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2810 i=0 2811 teststring="ABCD" 2812 2813 case $build_os in 2814 msdosdjgpp*) 2815 # On DJGPP, this test can blow up pretty badly due to problems in libc 2816 # (any single argument exceeding 2000 bytes causes a buffer overrun 2817 # during glob expansion). Even if it were fixed, the result of this 2818 # check would be larger than it should be. 2819 lt_cv_sys_max_cmd_len=12288; # 12K is about right 2820 ;; 2821 2822 gnu*) 2823 # Under GNU Hurd, this test is not required because there is 2824 # no limit to the length of command line arguments. 2825 # Libtool will interpret -1 as no limit whatsoever 2826 lt_cv_sys_max_cmd_len=-1; 2827 ;; 2828 2829 cygwin* | mingw*) 2830 # On Win9x/ME, this test blows up -- it succeeds, but takes 2831 # about 5 minutes as the teststring grows exponentially. 2832 # Worse, since 9x/ME are not pre-emptively multitasking, 2833 # you end up with a "frozen" computer, even though with patience 2834 # the test eventually succeeds (with a max line length of 256k). 2835 # Instead, let's just punt: use the minimum linelength reported by 2836 # all of the supported platforms: 8192 (on NT/2K/XP). 2837 lt_cv_sys_max_cmd_len=8192; 2838 ;; 2839 2840 amigaos*) 2841 # On AmigaOS with pdksh, this test takes hours, literally. 2842 # So we just punt and use a minimum line length of 8192. 2843 lt_cv_sys_max_cmd_len=8192; 2844 ;; 2845 2846 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2847 # This has been around since 386BSD, at least. Likely further. 2848 if test -x /sbin/sysctl; then 2849 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2850 elif test -x /usr/sbin/sysctl; then 2851 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2852 else 2853 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2854 fi 2855 # And add a safety zone 2856 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2857 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2858 ;; 2859 2860 interix*) 2861 # We know the value 262144 and hardcode it with a safety zone (like BSD) 2862 lt_cv_sys_max_cmd_len=196608 2863 ;; 2864 2865 osf*) 2866 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2867 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2868 # nice to cause kernel panics so lets avoid the loop below. 2869 # First set a reasonable default. 2870 lt_cv_sys_max_cmd_len=16384 2871 # 2872 if test -x /sbin/sysconfig; then 2873 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2874 *1*) lt_cv_sys_max_cmd_len=-1 ;; 2875 esac 2876 fi 2877 ;; 2878 sco3.2v5*) 2879 lt_cv_sys_max_cmd_len=102400 2880 ;; 2881 sysv5* | sco5v6* | sysv4.2uw2*) 2882 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2883 if test -n "$kargmax"; then 2884 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 2885 else 2886 lt_cv_sys_max_cmd_len=32768 2887 fi 2888 ;; 2889 *) 2890 # If test is not a shell built-in, we'll probably end up computing a 2891 # maximum length that is only half of the actual maximum length, but 2892 # we can't tell. 2893 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2894 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 2895 = "XX$teststring") >/dev/null 2>&1 && 2896 new_result=`expr "X$teststring" : ".*" 2>&1` && 2897 lt_cv_sys_max_cmd_len=$new_result && 2898 test $i != 17 # 1/2 MB should be enough 2899 do 2900 i=`expr $i + 1` 2901 teststring=$teststring$teststring 2902 done 2903 teststring= 2904 # Add a significant safety factor because C++ compilers can tack on massive 2905 # amounts of additional arguments before passing them to the linker. 2906 # It appears as though 1/2 is a usable value. 2907 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 2908 ;; 2909 esac 2910]) 2911if test -n $lt_cv_sys_max_cmd_len ; then 2912 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2913else 2914 AC_MSG_RESULT(none) 2915fi 2916])# AC_LIBTOOL_SYS_MAX_CMD_LEN 2917 2918 2919# _LT_AC_CHECK_DLFCN 2920# ------------------ 2921AC_DEFUN([_LT_AC_CHECK_DLFCN], 2922[AC_CHECK_HEADERS(dlfcn.h)dnl 2923])# _LT_AC_CHECK_DLFCN 2924 2925 2926# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2927# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2928# --------------------------------------------------------------------- 2929AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 2930[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 2931if test "$cross_compiling" = yes; then : 2932 [$4] 2933else 2934 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2935 lt_status=$lt_dlunknown 2936 cat > conftest.$ac_ext <<EOF 2937[#line __oline__ "configure" 2938#include "confdefs.h" 2939 2940#if HAVE_DLFCN_H 2941#include <dlfcn.h> 2942#endif 2943 2944#include <stdio.h> 2945 2946#ifdef RTLD_GLOBAL 2947# define LT_DLGLOBAL RTLD_GLOBAL 2948#else 2949# ifdef DL_GLOBAL 2950# define LT_DLGLOBAL DL_GLOBAL 2951# else 2952# define LT_DLGLOBAL 0 2953# endif 2954#endif 2955 2956/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2957 find out it does not work in some platform. */ 2958#ifndef LT_DLLAZY_OR_NOW 2959# ifdef RTLD_LAZY 2960# define LT_DLLAZY_OR_NOW RTLD_LAZY 2961# else 2962# ifdef DL_LAZY 2963# define LT_DLLAZY_OR_NOW DL_LAZY 2964# else 2965# ifdef RTLD_NOW 2966# define LT_DLLAZY_OR_NOW RTLD_NOW 2967# else 2968# ifdef DL_NOW 2969# define LT_DLLAZY_OR_NOW DL_NOW 2970# else 2971# define LT_DLLAZY_OR_NOW 0 2972# endif 2973# endif 2974# endif 2975# endif 2976#endif 2977 2978#ifdef __cplusplus 2979extern "C" void exit (int); 2980#endif 2981 2982void fnord() { int i=42;} 2983int main () 2984{ 2985 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2986 int status = $lt_dlunknown; 2987 2988 if (self) 2989 { 2990 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2991 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2992 /* dlclose (self); */ 2993 } 2994 else 2995 puts (dlerror ()); 2996 2997 exit (status); 2998}] 2999EOF 3000 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 3001 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 3002 lt_status=$? 3003 case x$lt_status in 3004 x$lt_dlno_uscore) $1 ;; 3005 x$lt_dlneed_uscore) $2 ;; 3006 x$lt_dlunknown|x*) $3 ;; 3007 esac 3008 else : 3009 # compilation failed 3010 $3 3011 fi 3012fi 3013rm -fr conftest* 3014])# _LT_AC_TRY_DLOPEN_SELF 3015 3016 3017# AC_LIBTOOL_DLOPEN_SELF 3018# ---------------------- 3019AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 3020[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 3021if test "x$enable_dlopen" != xyes; then 3022 enable_dlopen=unknown 3023 enable_dlopen_self=unknown 3024 enable_dlopen_self_static=unknown 3025else 3026 lt_cv_dlopen=no 3027 lt_cv_dlopen_libs= 3028 3029 case $host_os in 3030 beos*) 3031 lt_cv_dlopen="load_add_on" 3032 lt_cv_dlopen_libs= 3033 lt_cv_dlopen_self=yes 3034 ;; 3035 3036 mingw* | pw32*) 3037 lt_cv_dlopen="LoadLibrary" 3038 lt_cv_dlopen_libs= 3039 ;; 3040 3041 cygwin*) 3042 lt_cv_dlopen="dlopen" 3043 lt_cv_dlopen_libs= 3044 ;; 3045 3046 darwin*) 3047 # if libdl is installed we need to link against it 3048 AC_CHECK_LIB([dl], [dlopen], 3049 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3050 lt_cv_dlopen="dyld" 3051 lt_cv_dlopen_libs= 3052 lt_cv_dlopen_self=yes 3053 ]) 3054 ;; 3055 3056 *) 3057 AC_CHECK_FUNC([shl_load], 3058 [lt_cv_dlopen="shl_load"], 3059 [AC_CHECK_LIB([dld], [shl_load], 3060 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 3061 [AC_CHECK_FUNC([dlopen], 3062 [lt_cv_dlopen="dlopen"], 3063 [AC_CHECK_LIB([dl], [dlopen], 3064 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3065 [AC_CHECK_LIB([svld], [dlopen], 3066 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3067 [AC_CHECK_LIB([dld], [dld_link], 3068 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 3069 ]) 3070 ]) 3071 ]) 3072 ]) 3073 ]) 3074 ;; 3075 esac 3076 3077 if test "x$lt_cv_dlopen" != xno; then 3078 enable_dlopen=yes 3079 else 3080 enable_dlopen=no 3081 fi 3082 3083 case $lt_cv_dlopen in 3084 dlopen) 3085 save_CPPFLAGS="$CPPFLAGS" 3086 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3087 3088 save_LDFLAGS="$LDFLAGS" 3089 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3090 3091 save_LIBS="$LIBS" 3092 LIBS="$lt_cv_dlopen_libs $LIBS" 3093 3094 AC_CACHE_CHECK([whether a program can dlopen itself], 3095 lt_cv_dlopen_self, [dnl 3096 _LT_AC_TRY_DLOPEN_SELF( 3097 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3098 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3099 ]) 3100 3101 if test "x$lt_cv_dlopen_self" = xyes; then 3102 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3103 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3104 lt_cv_dlopen_self_static, [dnl 3105 _LT_AC_TRY_DLOPEN_SELF( 3106 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3107 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3108 ]) 3109 fi 3110 3111 CPPFLAGS="$save_CPPFLAGS" 3112 LDFLAGS="$save_LDFLAGS" 3113 LIBS="$save_LIBS" 3114 ;; 3115 esac 3116 3117 case $lt_cv_dlopen_self in 3118 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3119 *) enable_dlopen_self=unknown ;; 3120 esac 3121 3122 case $lt_cv_dlopen_self_static in 3123 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3124 *) enable_dlopen_self_static=unknown ;; 3125 esac 3126fi 3127])# AC_LIBTOOL_DLOPEN_SELF 3128 3129 3130# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 3131# --------------------------------- 3132# Check to see if options -c and -o are simultaneously supported by compiler 3133AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 3134[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 3135AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3136 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3137 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3138 $rm -r conftest 2>/dev/null 3139 mkdir conftest 3140 cd conftest 3141 mkdir out 3142 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 3143 3144 lt_compiler_flag="-o out/conftest2.$ac_objext" 3145 # Insert the option either (1) after the last *FLAGS variable, or 3146 # (2) before a word containing "conftest.", or (3) at the end. 3147 # Note that $ac_compile itself does not contain backslashes and begins 3148 # with a dollar sign (not a hyphen), so the echo should work correctly. 3149 lt_compile=`echo "$ac_compile" | $SED \ 3150 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 3151 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 3152 -e 's:$: $lt_compiler_flag:'` 3153 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3154 (eval "$lt_compile" 2>out/conftest.err) 3155 ac_status=$? 3156 cat out/conftest.err >&AS_MESSAGE_LOG_FD 3157 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3158 if (exit $ac_status) && test -s out/conftest2.$ac_objext 3159 then 3160 # The compiler can only warn and ignore the option if not recognized 3161 # So say no if there are warnings 3162 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 3163 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3164 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3165 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 3166 fi 3167 fi 3168 chmod u+w . 2>&AS_MESSAGE_LOG_FD 3169 $rm conftest* 3170 # SGI C++ compiler will create directory out/ii_files/ for 3171 # template instantiation 3172 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 3173 $rm out/* && rmdir out 3174 cd .. 3175 rmdir conftest 3176 $rm conftest* 3177]) 3178])# AC_LIBTOOL_PROG_CC_C_O 3179 3180 3181# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 3182# ----------------------------------------- 3183# Check to see if we can do hard links to lock some files if needed 3184AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 3185[AC_REQUIRE([_LT_AC_LOCK])dnl 3186 3187hard_links="nottested" 3188if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3189 # do not overwrite the value of need_locks provided by the user 3190 AC_MSG_CHECKING([if we can lock with hard links]) 3191 hard_links=yes 3192 $rm conftest* 3193 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3194 touch conftest.a 3195 ln conftest.a conftest.b 2>&5 || hard_links=no 3196 ln conftest.a conftest.b 2>/dev/null && hard_links=no 3197 AC_MSG_RESULT([$hard_links]) 3198 if test "$hard_links" = no; then 3199 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3200 need_locks=warn 3201 fi 3202else 3203 need_locks=no 3204fi 3205])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 3206 3207 3208# AC_LIBTOOL_OBJDIR 3209# ----------------- 3210AC_DEFUN([AC_LIBTOOL_OBJDIR], 3211[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3212[rm -f .libs 2>/dev/null 3213mkdir .libs 2>/dev/null 3214if test -d .libs; then 3215 lt_cv_objdir=.libs 3216else 3217 # MS-DOS does not allow filenames that begin with a dot. 3218 lt_cv_objdir=_libs 3219fi 3220rmdir .libs 2>/dev/null]) 3221objdir=$lt_cv_objdir 3222])# AC_LIBTOOL_OBJDIR 3223 3224 3225# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 3226# ---------------------------------------------- 3227# Check hardcoding attributes. 3228AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 3229[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3230_LT_AC_TAGVAR(hardcode_action, $1)= 3231if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 3232 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 3233 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3234 3235 # We can hardcode non-existant directories. 3236 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 3237 # If the only mechanism to avoid hardcoding is shlibpath_var, we 3238 # have to relink, otherwise we might link with an installed library 3239 # when we should be linking with a yet-to-be-installed one 3240 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3241 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 3242 # Linking always hardcodes the temporary library directory. 3243 _LT_AC_TAGVAR(hardcode_action, $1)=relink 3244 else 3245 # We can link without hardcoding, and we can hardcode nonexisting dirs. 3246 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 3247 fi 3248else 3249 # We cannot hardcode anything, or else we can only hardcode existing 3250 # directories. 3251 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 3252fi 3253AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 3254 3255if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 3256 # Fast installation is not supported 3257 enable_fast_install=no 3258elif test "$shlibpath_overrides_runpath" = yes || 3259 test "$enable_shared" = no; then 3260 # Fast installation is not necessary 3261 enable_fast_install=needless 3262fi 3263])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 3264 3265 3266# AC_LIBTOOL_SYS_LIB_STRIP 3267# ------------------------ 3268AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 3269[striplib= 3270old_striplib= 3271AC_MSG_CHECKING([whether stripping libraries is possible]) 3272if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 3273 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3274 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3275 AC_MSG_RESULT([yes]) 3276else 3277# FIXME - insert some real tests, host_os isn't really good enough 3278 case $host_os in 3279 darwin*) 3280 if test -n "$STRIP" ; then 3281 striplib="$STRIP -x" 3282 AC_MSG_RESULT([yes]) 3283 else 3284 AC_MSG_RESULT([no]) 3285fi 3286 ;; 3287 *) 3288 AC_MSG_RESULT([no]) 3289 ;; 3290 esac 3291fi 3292])# AC_LIBTOOL_SYS_LIB_STRIP 3293 3294 3295# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3296# ----------------------------- 3297# PORTME Fill in your ld.so characteristics 3298AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 3299[AC_MSG_CHECKING([dynamic linker characteristics]) 3300library_names_spec= 3301libname_spec='lib$name' 3302soname_spec= 3303shrext_cmds=".so" 3304postinstall_cmds= 3305postuninstall_cmds= 3306finish_cmds= 3307finish_eval= 3308shlibpath_var= 3309shlibpath_overrides_runpath=unknown 3310version_type=none 3311dynamic_linker="$host_os ld.so" 3312sys_lib_dlsearch_path_spec="/lib /usr/lib" 3313if test "$GCC" = yes; then 3314 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 3315 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then 3316 # if the path contains ";" then we assume it to be the separator 3317 # otherwise default to the standard path separator (i.e. ":") - it is 3318 # assumed that no part of a normal pathname contains ";" but that should 3319 # okay in the real world where ";" in dirpaths is itself problematic. 3320 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3321 else 3322 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3323 fi 3324else 3325 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3326fi 3327need_lib_prefix=unknown 3328hardcode_into_libs=no 3329 3330# when you set need_version to no, make sure it does not cause -set_version 3331# flags to be left without arguments 3332need_version=unknown 3333 3334case $host_os in 3335aix3*) 3336 version_type=linux 3337 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3338 shlibpath_var=LIBPATH 3339 3340 # AIX 3 has no versioning support, so we append a major version to the name. 3341 soname_spec='${libname}${release}${shared_ext}$major' 3342 ;; 3343 3344aix4* | aix5*) 3345 version_type=linux 3346 need_lib_prefix=no 3347 need_version=no 3348 hardcode_into_libs=yes 3349 if test "$host_cpu" = ia64; then 3350 # AIX 5 supports IA64 3351 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3352 shlibpath_var=LD_LIBRARY_PATH 3353 else 3354 # With GCC up to 2.95.x, collect2 would create an import file 3355 # for dependence libraries. The import file would start with 3356 # the line `#! .'. This would cause the generated library to 3357 # depend on `.', always an invalid library. This was fixed in 3358 # development snapshots of GCC prior to 3.0. 3359 case $host_os in 3360 aix4 | aix4.[[01]] | aix4.[[01]].*) 3361 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3362 echo ' yes ' 3363 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 3364 : 3365 else 3366 can_build_shared=no 3367 fi 3368 ;; 3369 esac 3370 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3371 # soname into executable. Probably we can add versioning support to 3372 # collect2, so additional links can be useful in future. 3373 if test "$aix_use_runtimelinking" = yes; then 3374 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3375 # instead of lib<name>.a to let people know that these are not 3376 # typical AIX shared libraries. 3377 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3378 else 3379 # We preserve .a as extension for shared libraries through AIX4.2 3380 # and later when we are not doing run time linking. 3381 library_names_spec='${libname}${release}.a $libname.a' 3382 soname_spec='${libname}${release}${shared_ext}$major' 3383 fi 3384 shlibpath_var=LIBPATH 3385 fi 3386 ;; 3387 3388amigaos*) 3389 library_names_spec='$libname.ixlibrary $libname.a' 3390 # Create ${libname}_ixlibrary.a entries in /sys/libs. 3391 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' 3392 ;; 3393 3394beos*) 3395 library_names_spec='${libname}${shared_ext}' 3396 dynamic_linker="$host_os ld.so" 3397 shlibpath_var=LIBRARY_PATH 3398 ;; 3399 3400bsdi[[45]]*) 3401 version_type=linux 3402 need_version=no 3403 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3404 soname_spec='${libname}${release}${shared_ext}$major' 3405 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3406 shlibpath_var=LD_LIBRARY_PATH 3407 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3408 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3409 # the default ld.so.conf also contains /usr/contrib/lib and 3410 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3411 # libtool to hard-code these into programs 3412 ;; 3413 3414cygwin* | mingw* | pw32*) 3415 version_type=windows 3416 shrext_cmds=".dll" 3417 need_version=no 3418 need_lib_prefix=no 3419 3420 case $GCC,$host_os in 3421 yes,cygwin* | yes,mingw* | yes,pw32*) 3422 library_names_spec='$libname.dll.a' 3423 # DLL is installed to $(libdir)/../bin by postinstall_cmds 3424 postinstall_cmds='base_file=`basename \${file}`~ 3425 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 3426 dldir=$destdir/`dirname \$dlpath`~ 3427 test -d \$dldir || mkdir -p \$dldir~ 3428 $install_prog $dir/$dlname \$dldir/$dlname~ 3429 chmod a+x \$dldir/$dlname' 3430 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3431 dlpath=$dir/\$dldll~ 3432 $rm \$dlpath' 3433 shlibpath_overrides_runpath=yes 3434 3435 case $host_os in 3436 cygwin*) 3437 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3438 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3439 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 3440 ;; 3441 mingw*) 3442 # MinGW DLLs use traditional 'lib' prefix 3443 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3444 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 3445 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 3446 # It is most probably a Windows format PATH printed by 3447 # mingw gcc, but we are running on Cygwin. Gcc prints its search 3448 # path with ; separators, and with drive letters. We can handle the 3449 # drive letters (cygwin fileutils understands them), so leave them, 3450 # especially as we might pass files found there to a mingw objdump, 3451 # which wouldn't understand a cygwinified path. Ahh. 3452 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3453 else 3454 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3455 fi 3456 ;; 3457 pw32*) 3458 # pw32 DLLs use 'pw' prefix rather than 'lib' 3459 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3460 ;; 3461 esac 3462 ;; 3463 3464 *) 3465 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3466 ;; 3467 esac 3468 dynamic_linker='Win32 ld.exe' 3469 # FIXME: first we should search . and the directory the executable is in 3470 shlibpath_var=PATH 3471 ;; 3472 3473darwin* | rhapsody*) 3474 dynamic_linker="$host_os dyld" 3475 version_type=darwin 3476 need_lib_prefix=no 3477 need_version=no 3478 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3479 soname_spec='${libname}${release}${major}$shared_ext' 3480 shlibpath_overrides_runpath=yes 3481 shlibpath_var=DYLD_LIBRARY_PATH 3482 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3483 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. 3484 if test "$GCC" = yes; then 3485 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"` 3486 else 3487 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' 3488 fi 3489 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3490 ;; 3491 3492dgux*) 3493 version_type=linux 3494 need_lib_prefix=no 3495 need_version=no 3496 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3497 soname_spec='${libname}${release}${shared_ext}$major' 3498 shlibpath_var=LD_LIBRARY_PATH 3499 ;; 3500 3501freebsd1*) 3502 dynamic_linker=no 3503 ;; 3504 3505kfreebsd*-gnu) 3506 version_type=linux 3507 need_lib_prefix=no 3508 need_version=no 3509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3510 soname_spec='${libname}${release}${shared_ext}$major' 3511 shlibpath_var=LD_LIBRARY_PATH 3512 shlibpath_overrides_runpath=no 3513 hardcode_into_libs=yes 3514 dynamic_linker='GNU ld.so' 3515 ;; 3516 3517freebsd* | dragonfly*) 3518 # DragonFly does not have aout. When/if they implement a new 3519 # versioning mechanism, adjust this. 3520 if test -x /usr/bin/objformat; then 3521 objformat=`/usr/bin/objformat` 3522 else 3523 case $host_os in 3524 freebsd[[123]]*) objformat=aout ;; 3525 *) objformat=elf ;; 3526 esac 3527 fi 3528 version_type=freebsd-$objformat 3529 case $version_type in 3530 freebsd-elf*) 3531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3532 need_version=no 3533 need_lib_prefix=no 3534 ;; 3535 freebsd-*) 3536 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3537 need_version=yes 3538 ;; 3539 esac 3540 shlibpath_var=LD_LIBRARY_PATH 3541 case $host_os in 3542 freebsd2*) 3543 shlibpath_overrides_runpath=yes 3544 ;; 3545 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3546 shlibpath_overrides_runpath=yes 3547 hardcode_into_libs=yes 3548 ;; 3549 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3550 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3551 shlibpath_overrides_runpath=no 3552 hardcode_into_libs=yes 3553 ;; 3554 freebsd*) # from 4.6 on 3555 shlibpath_overrides_runpath=yes 3556 hardcode_into_libs=yes 3557 ;; 3558 esac 3559 ;; 3560 3561gnu*) 3562 version_type=linux 3563 need_lib_prefix=no 3564 need_version=no 3565 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3566 soname_spec='${libname}${release}${shared_ext}$major' 3567 shlibpath_var=LD_LIBRARY_PATH 3568 hardcode_into_libs=yes 3569 ;; 3570 3571hpux9* | hpux10* | hpux11*) 3572 # Give a soname corresponding to the major version so that dld.sl refuses to 3573 # link against other versions. 3574 version_type=sunos 3575 need_lib_prefix=no 3576 need_version=no 3577 case $host_cpu in 3578 ia64*) 3579 shrext_cmds='.so' 3580 hardcode_into_libs=yes 3581 dynamic_linker="$host_os dld.so" 3582 shlibpath_var=LD_LIBRARY_PATH 3583 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3584 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3585 soname_spec='${libname}${release}${shared_ext}$major' 3586 if test "X$HPUX_IA64_MODE" = X32; then 3587 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3588 else 3589 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3590 fi 3591 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3592 ;; 3593 hppa*64*) 3594 shrext_cmds='.sl' 3595 hardcode_into_libs=yes 3596 dynamic_linker="$host_os dld.sl" 3597 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3598 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3599 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3600 soname_spec='${libname}${release}${shared_ext}$major' 3601 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3602 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3603 ;; 3604 *) 3605 shrext_cmds='.sl' 3606 dynamic_linker="$host_os dld.sl" 3607 shlibpath_var=SHLIB_PATH 3608 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3609 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3610 soname_spec='${libname}${release}${shared_ext}$major' 3611 ;; 3612 esac 3613 # HP-UX runs *really* slowly unless shared libraries are mode 555. 3614 postinstall_cmds='chmod 555 $lib' 3615 ;; 3616 3617interix3*) 3618 version_type=linux 3619 need_lib_prefix=no 3620 need_version=no 3621 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3622 soname_spec='${libname}${release}${shared_ext}$major' 3623 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3624 shlibpath_var=LD_LIBRARY_PATH 3625 shlibpath_overrides_runpath=no 3626 hardcode_into_libs=yes 3627 ;; 3628 3629irix5* | irix6* | nonstopux*) 3630 case $host_os in 3631 nonstopux*) version_type=nonstopux ;; 3632 *) 3633 if test "$lt_cv_prog_gnu_ld" = yes; then 3634 version_type=linux 3635 else 3636 version_type=irix 3637 fi ;; 3638 esac 3639 need_lib_prefix=no 3640 need_version=no 3641 soname_spec='${libname}${release}${shared_ext}$major' 3642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3643 case $host_os in 3644 irix5* | nonstopux*) 3645 libsuff= shlibsuff= 3646 ;; 3647 *) 3648 case $LD in # libtool.m4 will add one of these switches to LD 3649 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3650 libsuff= shlibsuff= libmagic=32-bit;; 3651 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3652 libsuff=32 shlibsuff=N32 libmagic=N32;; 3653 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3654 libsuff=64 shlibsuff=64 libmagic=64-bit;; 3655 *) libsuff= shlibsuff= libmagic=never-match;; 3656 esac 3657 ;; 3658 esac 3659 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3660 shlibpath_overrides_runpath=no 3661 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3662 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3663 hardcode_into_libs=yes 3664 ;; 3665 3666# No shared lib support for Linux oldld, aout, or coff. 3667linux*oldld* | linux*aout* | linux*coff*) 3668 dynamic_linker=no 3669 ;; 3670 3671# This must be Linux ELF. 3672linux*) 3673 version_type=linux 3674 need_lib_prefix=no 3675 need_version=no 3676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3677 soname_spec='${libname}${release}${shared_ext}$major' 3678 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3679 shlibpath_var=LD_LIBRARY_PATH 3680 shlibpath_overrides_runpath=no 3681 # This implies no fast_install, which is unacceptable. 3682 # Some rework will be needed to allow for fast_install 3683 # before this can be enabled. 3684 hardcode_into_libs=yes 3685 3686 # Append ld.so.conf contents to the search path 3687 if test -f /etc/ld.so.conf; then 3688 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/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` 3689 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 3690 fi 3691 3692 # We used to test for /lib/ld.so.1 and disable shared libraries on 3693 # powerpc, because MkLinux only supported shared libraries with the 3694 # GNU dynamic linker. Since this was broken with cross compilers, 3695 # most powerpc-linux boxes support dynamic linking these days and 3696 # people can always --disable-shared, the test was removed, and we 3697 # assume the GNU/Linux dynamic linker is in use. 3698 dynamic_linker='GNU/Linux ld.so' 3699 ;; 3700 3701knetbsd*-gnu) 3702 version_type=linux 3703 need_lib_prefix=no 3704 need_version=no 3705 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3706 soname_spec='${libname}${release}${shared_ext}$major' 3707 shlibpath_var=LD_LIBRARY_PATH 3708 shlibpath_overrides_runpath=no 3709 hardcode_into_libs=yes 3710 dynamic_linker='GNU ld.so' 3711 ;; 3712 3713netbsd*) 3714 version_type=sunos 3715 need_lib_prefix=no 3716 need_version=no 3717 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 3718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3719 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3720 dynamic_linker='NetBSD (a.out) ld.so' 3721 else 3722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3723 soname_spec='${libname}${release}${shared_ext}$major' 3724 dynamic_linker='NetBSD ld.elf_so' 3725 fi 3726 shlibpath_var=LD_LIBRARY_PATH 3727 shlibpath_overrides_runpath=yes 3728 hardcode_into_libs=yes 3729 ;; 3730 3731newsos6) 3732 version_type=linux 3733 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3734 shlibpath_var=LD_LIBRARY_PATH 3735 shlibpath_overrides_runpath=yes 3736 ;; 3737 3738nto-qnx*) 3739 version_type=linux 3740 need_lib_prefix=no 3741 need_version=no 3742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3743 soname_spec='${libname}${release}${shared_ext}$major' 3744 shlibpath_var=LD_LIBRARY_PATH 3745 shlibpath_overrides_runpath=yes 3746 ;; 3747 3748openbsd*) 3749 version_type=sunos 3750 sys_lib_dlsearch_path_spec="/usr/lib" 3751 need_lib_prefix=no 3752 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3753 case $host_os in 3754 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3755 *) need_version=no ;; 3756 esac 3757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3758 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3759 shlibpath_var=LD_LIBRARY_PATH 3760 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3761 case $host_os in 3762 openbsd2.[[89]] | openbsd2.[[89]].*) 3763 shlibpath_overrides_runpath=no 3764 ;; 3765 *) 3766 shlibpath_overrides_runpath=yes 3767 ;; 3768 esac 3769 else 3770 shlibpath_overrides_runpath=yes 3771 fi 3772 ;; 3773 3774os2*) 3775 libname_spec='$name' 3776 shrext_cmds=".dll" 3777 need_lib_prefix=no 3778 library_names_spec='$libname${shared_ext} $libname.a' 3779 dynamic_linker='OS/2 ld.exe' 3780 shlibpath_var=LIBPATH 3781 ;; 3782 3783osf3* | osf4* | osf5*) 3784 version_type=osf 3785 need_lib_prefix=no 3786 need_version=no 3787 soname_spec='${libname}${release}${shared_ext}$major' 3788 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3789 shlibpath_var=LD_LIBRARY_PATH 3790 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3791 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3792 ;; 3793 3794solaris*) 3795 version_type=linux 3796 need_lib_prefix=no 3797 need_version=no 3798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3799 soname_spec='${libname}${release}${shared_ext}$major' 3800 shlibpath_var=LD_LIBRARY_PATH 3801 shlibpath_overrides_runpath=yes 3802 hardcode_into_libs=yes 3803 # ldd complains unless libraries are executable 3804 postinstall_cmds='chmod +x $lib' 3805 ;; 3806 3807sunos4*) 3808 version_type=sunos 3809 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3810 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3811 shlibpath_var=LD_LIBRARY_PATH 3812 shlibpath_overrides_runpath=yes 3813 if test "$with_gnu_ld" = yes; then 3814 need_lib_prefix=no 3815 fi 3816 need_version=yes 3817 ;; 3818 3819sysv4 | sysv4.3*) 3820 version_type=linux 3821 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3822 soname_spec='${libname}${release}${shared_ext}$major' 3823 shlibpath_var=LD_LIBRARY_PATH 3824 case $host_vendor in 3825 sni) 3826 shlibpath_overrides_runpath=no 3827 need_lib_prefix=no 3828 export_dynamic_flag_spec='${wl}-Blargedynsym' 3829 runpath_var=LD_RUN_PATH 3830 ;; 3831 siemens) 3832 need_lib_prefix=no 3833 ;; 3834 motorola) 3835 need_lib_prefix=no 3836 need_version=no 3837 shlibpath_overrides_runpath=no 3838 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3839 ;; 3840 esac 3841 ;; 3842 3843sysv4*MP*) 3844 if test -d /usr/nec ;then 3845 version_type=linux 3846 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3847 soname_spec='$libname${shared_ext}.$major' 3848 shlibpath_var=LD_LIBRARY_PATH 3849 fi 3850 ;; 3851 3852sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3853 version_type=freebsd-elf 3854 need_lib_prefix=no 3855 need_version=no 3856 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3857 soname_spec='${libname}${release}${shared_ext}$major' 3858 shlibpath_var=LD_LIBRARY_PATH 3859 hardcode_into_libs=yes 3860 if test "$with_gnu_ld" = yes; then 3861 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3862 shlibpath_overrides_runpath=no 3863 else 3864 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3865 shlibpath_overrides_runpath=yes 3866 case $host_os in 3867 sco3.2v5*) 3868 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3869 ;; 3870 esac 3871 fi 3872 sys_lib_dlsearch_path_spec='/usr/lib' 3873 ;; 3874 3875uts4*) 3876 version_type=linux 3877 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3878 soname_spec='${libname}${release}${shared_ext}$major' 3879 shlibpath_var=LD_LIBRARY_PATH 3880 ;; 3881 3882*) 3883 dynamic_linker=no 3884 ;; 3885esac 3886AC_MSG_RESULT([$dynamic_linker]) 3887test "$dynamic_linker" = no && can_build_shared=no 3888 3889variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3890if test "$GCC" = yes; then 3891 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3892fi 3893])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 3894 3895 3896# _LT_AC_TAGCONFIG 3897# ---------------- 3898AC_DEFUN([_LT_AC_TAGCONFIG], 3899[AC_ARG_WITH([tags], 3900 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 3901 [include additional configurations @<:@automatic@:>@])], 3902 [tagnames="$withval"]) 3903 3904if test -f "$ltmain" && test -n "$tagnames"; then 3905 if test ! -f "${ofile}"; then 3906 AC_MSG_WARN([output file `$ofile' does not exist]) 3907 fi 3908 3909 if test -z "$LTCC"; then 3910 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 3911 if test -z "$LTCC"; then 3912 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 3913 else 3914 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 3915 fi 3916 fi 3917 if test -z "$LTCFLAGS"; then 3918 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 3919 fi 3920 3921 # Extract list of available tagged configurations in $ofile. 3922 # Note that this assumes the entire list is on one line. 3923 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 3924 3925 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 3926 for tagname in $tagnames; do 3927 IFS="$lt_save_ifs" 3928 # Check whether tagname contains only valid characters 3929 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 3930 "") ;; 3931 *) AC_MSG_ERROR([invalid tag name: $tagname]) 3932 ;; 3933 esac 3934 3935 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 3936 then 3937 AC_MSG_ERROR([tag name \"$tagname\" already exists]) 3938 fi 3939 3940 # Update the list of available tags. 3941 if test -n "$tagname"; then 3942 echo appending configuration tag \"$tagname\" to $ofile 3943 3944 case $tagname in 3945 CXX) 3946 if test -n "$CXX" && ( test "X$CXX" != "Xno" && 3947 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 3948 (test "X$CXX" != "Xg++"))) ; then 3949 AC_LIBTOOL_LANG_CXX_CONFIG 3950 else 3951 tagname="" 3952 fi 3953 ;; 3954 3955 F77) 3956 if test -n "$F77" && test "X$F77" != "Xno"; then 3957 AC_LIBTOOL_LANG_F77_CONFIG 3958 else 3959 tagname="" 3960 fi 3961 ;; 3962 3963 GCJ) 3964 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 3965 AC_LIBTOOL_LANG_GCJ_CONFIG 3966 else 3967 tagname="" 3968 fi 3969 ;; 3970 3971 RC) 3972 AC_LIBTOOL_LANG_RC_CONFIG 3973 ;; 3974 3975 *) 3976 AC_MSG_ERROR([Unsupported tag name: $tagname]) 3977 ;; 3978 esac 3979 3980 # Append the new tag name to the list of available tags. 3981 if test -n "$tagname" ; then 3982 available_tags="$available_tags $tagname" 3983 fi 3984 fi 3985 done 3986 IFS="$lt_save_ifs" 3987 3988 # Now substitute the updated list of available tags. 3989 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 3990 mv "${ofile}T" "$ofile" 3991 chmod +x "$ofile" 3992 else 3993 rm -f "${ofile}T" 3994 AC_MSG_ERROR([unable to update list of available tagged configurations.]) 3995 fi 3996fi 3997])# _LT_AC_TAGCONFIG 3998 3999 4000# AC_LIBTOOL_DLOPEN 4001# ----------------- 4002# enable checks for dlopen support 4003AC_DEFUN([AC_LIBTOOL_DLOPEN], 4004 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 4005])# AC_LIBTOOL_DLOPEN 4006 4007 4008# AC_LIBTOOL_WIN32_DLL 4009# -------------------- 4010# declare package support for building win32 DLLs 4011AC_DEFUN([AC_LIBTOOL_WIN32_DLL], 4012[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 4013])# AC_LIBTOOL_WIN32_DLL 4014 4015 4016# AC_ENABLE_SHARED([DEFAULT]) 4017# --------------------------- 4018# implement the --enable-shared flag 4019# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4020AC_DEFUN([AC_ENABLE_SHARED], 4021[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 4022AC_ARG_ENABLE([shared], 4023 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 4024 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 4025 [p=${PACKAGE-default} 4026 case $enableval in 4027 yes) enable_shared=yes ;; 4028 no) enable_shared=no ;; 4029 *) 4030 enable_shared=no 4031 # Look at the argument we got. We use all the common list separators. 4032 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4033 for pkg in $enableval; do 4034 IFS="$lt_save_ifs" 4035 if test "X$pkg" = "X$p"; then 4036 enable_shared=yes 4037 fi 4038 done 4039 IFS="$lt_save_ifs" 4040 ;; 4041 esac], 4042 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 4043])# AC_ENABLE_SHARED 4044 4045 4046# AC_DISABLE_SHARED 4047# ----------------- 4048# set the default shared flag to --disable-shared 4049AC_DEFUN([AC_DISABLE_SHARED], 4050[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4051AC_ENABLE_SHARED(no) 4052])# AC_DISABLE_SHARED 4053 4054 4055# AC_ENABLE_STATIC([DEFAULT]) 4056# --------------------------- 4057# implement the --enable-static flag 4058# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4059AC_DEFUN([AC_ENABLE_STATIC], 4060[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 4061AC_ARG_ENABLE([static], 4062 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 4063 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 4064 [p=${PACKAGE-default} 4065 case $enableval in 4066 yes) enable_static=yes ;; 4067 no) enable_static=no ;; 4068 *) 4069 enable_static=no 4070 # Look at the argument we got. We use all the common list separators. 4071 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4072 for pkg in $enableval; do 4073 IFS="$lt_save_ifs" 4074 if test "X$pkg" = "X$p"; then 4075 enable_static=yes 4076 fi 4077 done 4078 IFS="$lt_save_ifs" 4079 ;; 4080 esac], 4081 [enable_static=]AC_ENABLE_STATIC_DEFAULT) 4082])# AC_ENABLE_STATIC 4083 4084 4085# AC_DISABLE_STATIC 4086# ----------------- 4087# set the default static flag to --disable-static 4088AC_DEFUN([AC_DISABLE_STATIC], 4089[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4090AC_ENABLE_STATIC(no) 4091])# AC_DISABLE_STATIC 4092 4093 4094# AC_ENABLE_FAST_INSTALL([DEFAULT]) 4095# --------------------------------- 4096# implement the --enable-fast-install flag 4097# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 4098AC_DEFUN([AC_ENABLE_FAST_INSTALL], 4099[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 4100AC_ARG_ENABLE([fast-install], 4101 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 4102 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 4103 [p=${PACKAGE-default} 4104 case $enableval in 4105 yes) enable_fast_install=yes ;; 4106 no) enable_fast_install=no ;; 4107 *) 4108 enable_fast_install=no 4109 # Look at the argument we got. We use all the common list separators. 4110 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 4111 for pkg in $enableval; do 4112 IFS="$lt_save_ifs" 4113 if test "X$pkg" = "X$p"; then 4114 enable_fast_install=yes 4115 fi 4116 done 4117 IFS="$lt_save_ifs" 4118 ;; 4119 esac], 4120 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 4121])# AC_ENABLE_FAST_INSTALL 4122 4123 4124# AC_DISABLE_FAST_INSTALL 4125# ----------------------- 4126# set the default to --disable-fast-install 4127AC_DEFUN([AC_DISABLE_FAST_INSTALL], 4128[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4129AC_ENABLE_FAST_INSTALL(no) 4130])# AC_DISABLE_FAST_INSTALL 4131 4132 4133# AC_LIBTOOL_PICMODE([MODE]) 4134# -------------------------- 4135# implement the --with-pic flag 4136# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 4137AC_DEFUN([AC_LIBTOOL_PICMODE], 4138[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4139pic_mode=ifelse($#,1,$1,default) 4140])# AC_LIBTOOL_PICMODE 4141 4142 4143# AC_PROG_EGREP 4144# ------------- 4145# This is predefined starting with Autoconf 2.54, so this conditional 4146# definition can be removed once we require Autoconf 2.54 or later. 4147m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 4148[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 4149 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 4150 then ac_cv_prog_egrep='grep -E' 4151 else ac_cv_prog_egrep='egrep' 4152 fi]) 4153 EGREP=$ac_cv_prog_egrep 4154 AC_SUBST([EGREP]) 4155])]) 4156 4157 4158# AC_PATH_TOOL_PREFIX 4159# ------------------- 4160# find a file program which can recognise shared library 4161AC_DEFUN([AC_PATH_TOOL_PREFIX], 4162[AC_REQUIRE([AC_PROG_EGREP])dnl 4163AC_MSG_CHECKING([for $1]) 4164AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4165[case $MAGIC_CMD in 4166[[\\/*] | ?:[\\/]*]) 4167 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4168 ;; 4169*) 4170 lt_save_MAGIC_CMD="$MAGIC_CMD" 4171 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4172dnl $ac_dummy forces splitting on constant user-supplied paths. 4173dnl POSIX.2 word splitting is done only on the output of word expansions, 4174dnl not every word. This closes a longstanding sh security hole. 4175 ac_dummy="ifelse([$2], , $PATH, [$2])" 4176 for ac_dir in $ac_dummy; do 4177 IFS="$lt_save_ifs" 4178 test -z "$ac_dir" && ac_dir=. 4179 if test -f $ac_dir/$1; then 4180 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4181 if test -n "$file_magic_test_file"; then 4182 case $deplibs_check_method in 4183 "file_magic "*) 4184 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4185 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4186 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4187 $EGREP "$file_magic_regex" > /dev/null; then 4188 : 4189 else 4190 cat <<EOF 1>&2 4191 4192*** Warning: the command libtool uses to detect shared libraries, 4193*** $file_magic_cmd, produces output that libtool cannot recognize. 4194*** The result is that libtool may fail to recognize shared libraries 4195*** as such. This will affect the creation of libtool libraries that 4196*** depend on shared libraries, but programs linked with such libtool 4197*** libraries will work regardless of this problem. Nevertheless, you 4198*** may want to report the problem to your system manager and/or to 4199*** bug-libtool@gnu.org 4200 4201EOF 4202 fi ;; 4203 esac 4204 fi 4205 break 4206 fi 4207 done 4208 IFS="$lt_save_ifs" 4209 MAGIC_CMD="$lt_save_MAGIC_CMD" 4210 ;; 4211esac]) 4212MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4213if test -n "$MAGIC_CMD"; then 4214 AC_MSG_RESULT($MAGIC_CMD) 4215else 4216 AC_MSG_RESULT(no) 4217fi 4218])# AC_PATH_TOOL_PREFIX 4219 4220 4221# AC_PATH_MAGIC 4222# ------------- 4223# find a file program which can recognise a shared library 4224AC_DEFUN([AC_PATH_MAGIC], 4225[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4226if test -z "$lt_cv_path_MAGIC_CMD"; then 4227 if test -n "$ac_tool_prefix"; then 4228 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4229 else 4230 MAGIC_CMD=: 4231 fi 4232fi 4233])# AC_PATH_MAGIC 4234 4235 4236# AC_PROG_LD 4237# ---------- 4238# find the pathname to the GNU or non-GNU linker 4239AC_DEFUN([AC_PROG_LD], 4240[AC_ARG_WITH([gnu-ld], 4241 [AC_HELP_STRING([--with-gnu-ld], 4242 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4243 [test "$withval" = no || with_gnu_ld=yes], 4244 [with_gnu_ld=no]) 4245AC_REQUIRE([LT_AC_PROG_SED])dnl 4246AC_REQUIRE([AC_PROG_CC])dnl 4247AC_REQUIRE([AC_CANONICAL_HOST])dnl 4248AC_REQUIRE([AC_CANONICAL_BUILD])dnl 4249ac_prog=ld 4250if test "$GCC" = yes; then 4251 # Check if gcc -print-prog-name=ld gives a path. 4252 AC_MSG_CHECKING([for ld used by $CC]) 4253 case $host in 4254 *-*-mingw*) 4255 # gcc leaves a trailing carriage return which upsets mingw 4256 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4257 *) 4258 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4259 esac 4260 case $ac_prog in 4261 # Accept absolute paths. 4262 [[\\/]]* | ?:[[\\/]]*) 4263 re_direlt='/[[^/]][[^/]]*/\.\./' 4264 # Canonicalize the pathname of ld 4265 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 4266 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 4267 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 4268 done 4269 test -z "$LD" && LD="$ac_prog" 4270 ;; 4271 "") 4272 # If it fails, then pretend we aren't using GCC. 4273 ac_prog=ld 4274 ;; 4275 *) 4276 # If it is relative, then search for the first ld in PATH. 4277 with_gnu_ld=unknown 4278 ;; 4279 esac 4280elif test "$with_gnu_ld" = yes; then 4281 AC_MSG_CHECKING([for GNU ld]) 4282else 4283 AC_MSG_CHECKING([for non-GNU ld]) 4284fi 4285AC_CACHE_VAL(lt_cv_path_LD, 4286[if test -z "$LD"; then 4287 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4288 for ac_dir in $PATH; do 4289 IFS="$lt_save_ifs" 4290 test -z "$ac_dir" && ac_dir=. 4291 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4292 lt_cv_path_LD="$ac_dir/$ac_prog" 4293 # Check to see if the program is GNU ld. I'd rather use --version, 4294 # but apparently some variants of GNU ld only accept -v. 4295 # Break only if it was the GNU/non-GNU ld that we prefer. 4296 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4297 *GNU* | *'with BFD'*) 4298 test "$with_gnu_ld" != no && break 4299 ;; 4300 *) 4301 test "$with_gnu_ld" != yes && break 4302 ;; 4303 esac 4304 fi 4305 done 4306 IFS="$lt_save_ifs" 4307else 4308 lt_cv_path_LD="$LD" # Let the user override the test with a path. 4309fi]) 4310LD="$lt_cv_path_LD" 4311if test -n "$LD"; then 4312 AC_MSG_RESULT($LD) 4313else 4314 AC_MSG_RESULT(no) 4315fi 4316test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4317AC_PROG_LD_GNU 4318])# AC_PROG_LD 4319 4320 4321# AC_PROG_LD_GNU 4322# -------------- 4323AC_DEFUN([AC_PROG_LD_GNU], 4324[AC_REQUIRE([AC_PROG_EGREP])dnl 4325AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4326[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4327case `$LD -v 2>&1 </dev/null` in 4328*GNU* | *'with BFD'*) 4329 lt_cv_prog_gnu_ld=yes 4330 ;; 4331*) 4332 lt_cv_prog_gnu_ld=no 4333 ;; 4334esac]) 4335with_gnu_ld=$lt_cv_prog_gnu_ld 4336])# AC_PROG_LD_GNU 4337 4338 4339# AC_PROG_LD_RELOAD_FLAG 4340# ---------------------- 4341# find reload flag for linker 4342# -- PORTME Some linkers may need a different reload flag. 4343AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 4344[AC_CACHE_CHECK([for $LD option to reload object files], 4345 lt_cv_ld_reload_flag, 4346 [lt_cv_ld_reload_flag='-r']) 4347reload_flag=$lt_cv_ld_reload_flag 4348case $reload_flag in 4349"" | " "*) ;; 4350*) reload_flag=" $reload_flag" ;; 4351esac 4352reload_cmds='$LD$reload_flag -o $output$reload_objs' 4353case $host_os in 4354 darwin*) 4355 if test "$GCC" = yes; then 4356 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4357 else 4358 reload_cmds='$LD$reload_flag -o $output$reload_objs' 4359 fi 4360 ;; 4361esac 4362])# AC_PROG_LD_RELOAD_FLAG 4363 4364 4365# AC_DEPLIBS_CHECK_METHOD 4366# ----------------------- 4367# how to check for library dependencies 4368# -- PORTME fill in with the dynamic library characteristics 4369AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 4370[AC_CACHE_CHECK([how to recognise dependent libraries], 4371lt_cv_deplibs_check_method, 4372[lt_cv_file_magic_cmd='$MAGIC_CMD' 4373lt_cv_file_magic_test_file= 4374lt_cv_deplibs_check_method='unknown' 4375# Need to set the preceding variable on all platforms that support 4376# interlibrary dependencies. 4377# 'none' -- dependencies not supported. 4378# `unknown' -- same as none, but documents that we really don't know. 4379# 'pass_all' -- all dependencies passed with no checks. 4380# 'test_compile' -- check by making test program. 4381# 'file_magic [[regex]]' -- check by looking for files in library path 4382# which responds to the $file_magic_cmd with a given extended regex. 4383# If you have `file' or equivalent on your system and you're not sure 4384# whether `pass_all' will *always* work, you probably want this one. 4385 4386case $host_os in 4387aix4* | aix5*) 4388 lt_cv_deplibs_check_method=pass_all 4389 ;; 4390 4391beos*) 4392 lt_cv_deplibs_check_method=pass_all 4393 ;; 4394 4395bsdi[[45]]*) 4396 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4397 lt_cv_file_magic_cmd='/usr/bin/file -L' 4398 lt_cv_file_magic_test_file=/shlib/libc.so 4399 ;; 4400 4401cygwin*) 4402 # func_win32_libid is a shell function defined in ltmain.sh 4403 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4404 lt_cv_file_magic_cmd='func_win32_libid' 4405 ;; 4406 4407mingw* | pw32*) 4408 # Base MSYS/MinGW do not provide the 'file' command needed by 4409 # func_win32_libid shell function, so use a weaker test based on 'objdump'. 4410 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 4411 lt_cv_file_magic_cmd='$OBJDUMP -f' 4412 ;; 4413 4414darwin* | rhapsody*) 4415 lt_cv_deplibs_check_method=pass_all 4416 ;; 4417 4418freebsd* | kfreebsd*-gnu | dragonfly*) 4419 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4420 case $host_cpu in 4421 i*86 ) 4422 # Not sure whether the presence of OpenBSD here was a mistake. 4423 # Let's accept both of them until this is cleared up. 4424 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4425 lt_cv_file_magic_cmd=/usr/bin/file 4426 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4427 ;; 4428 esac 4429 else 4430 lt_cv_deplibs_check_method=pass_all 4431 fi 4432 ;; 4433 4434gnu*) 4435 lt_cv_deplibs_check_method=pass_all 4436 ;; 4437 4438hpux10.20* | hpux11*) 4439 lt_cv_file_magic_cmd=/usr/bin/file 4440 case $host_cpu in 4441 ia64*) 4442 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4443 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4444 ;; 4445 hppa*64*) 4446 [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]'] 4447 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4448 ;; 4449 *) 4450 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 4451 lt_cv_file_magic_test_file=/usr/lib/libc.sl 4452 ;; 4453 esac 4454 ;; 4455 4456interix3*) 4457 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4458 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 4459 ;; 4460 4461irix5* | irix6* | nonstopux*) 4462 case $LD in 4463 *-32|*"-32 ") libmagic=32-bit;; 4464 *-n32|*"-n32 ") libmagic=N32;; 4465 *-64|*"-64 ") libmagic=64-bit;; 4466 *) libmagic=never-match;; 4467 esac 4468 lt_cv_deplibs_check_method=pass_all 4469 ;; 4470 4471# This must be Linux ELF. 4472linux*) 4473 lt_cv_deplibs_check_method=pass_all 4474 ;; 4475 4476netbsd*) 4477 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 4478 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4479 else 4480 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4481 fi 4482 ;; 4483 4484newos6*) 4485 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4486 lt_cv_file_magic_cmd=/usr/bin/file 4487 lt_cv_file_magic_test_file=/usr/lib/libnls.so 4488 ;; 4489 4490nto-qnx*) 4491 lt_cv_deplibs_check_method=unknown 4492 ;; 4493 4494openbsd*) 4495 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4496 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 4497 else 4498 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4499 fi 4500 ;; 4501 4502osf3* | osf4* | osf5*) 4503 lt_cv_deplibs_check_method=pass_all 4504 ;; 4505 4506solaris*) 4507 lt_cv_deplibs_check_method=pass_all 4508 ;; 4509 4510sysv4 | sysv4.3*) 4511 case $host_vendor in 4512 motorola) 4513 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]]' 4514 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 4515 ;; 4516 ncr) 4517 lt_cv_deplibs_check_method=pass_all 4518 ;; 4519 sequent) 4520 lt_cv_file_magic_cmd='/bin/file' 4521 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4522 ;; 4523 sni) 4524 lt_cv_file_magic_cmd='/bin/file' 4525 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4526 lt_cv_file_magic_test_file=/lib/libc.so 4527 ;; 4528 siemens) 4529 lt_cv_deplibs_check_method=pass_all 4530 ;; 4531 pc) 4532 lt_cv_deplibs_check_method=pass_all 4533 ;; 4534 esac 4535 ;; 4536 4537sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4538 lt_cv_deplibs_check_method=pass_all 4539 ;; 4540esac 4541]) 4542file_magic_cmd=$lt_cv_file_magic_cmd 4543deplibs_check_method=$lt_cv_deplibs_check_method 4544test -z "$deplibs_check_method" && deplibs_check_method=unknown 4545])# AC_DEPLIBS_CHECK_METHOD 4546 4547 4548# AC_PROG_NM 4549# ---------- 4550# find the pathname to a BSD-compatible name lister 4551AC_DEFUN([AC_PROG_NM], 4552[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 4553[if test -n "$NM"; then 4554 # Let the user override the test. 4555 lt_cv_path_NM="$NM" 4556else 4557 lt_nm_to_check="${ac_tool_prefix}nm" 4558 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 4559 lt_nm_to_check="$lt_nm_to_check nm" 4560 fi 4561 for lt_tmp_nm in $lt_nm_to_check; do 4562 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4563 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 4564 IFS="$lt_save_ifs" 4565 test -z "$ac_dir" && ac_dir=. 4566 tmp_nm="$ac_dir/$lt_tmp_nm" 4567 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 4568 # Check to see if the nm accepts a BSD-compat flag. 4569 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 4570 # nm: unknown option "B" ignored 4571 # Tru64's nm complains that /dev/null is an invalid object file 4572 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 4573 */dev/null* | *'Invalid file or object type'*) 4574 lt_cv_path_NM="$tmp_nm -B" 4575 break 4576 ;; 4577 *) 4578 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 4579 */dev/null*) 4580 lt_cv_path_NM="$tmp_nm -p" 4581 break 4582 ;; 4583 *) 4584 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 4585 continue # so that we can try to find one that supports BSD flags 4586 ;; 4587 esac 4588 ;; 4589 esac 4590 fi 4591 done 4592 IFS="$lt_save_ifs" 4593 done 4594 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 4595fi]) 4596NM="$lt_cv_path_NM" 4597])# AC_PROG_NM 4598 4599 4600# AC_CHECK_LIBM 4601# ------------- 4602# check for math library 4603AC_DEFUN([AC_CHECK_LIBM], 4604[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4605LIBM= 4606case $host in 4607*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 4608 # These system don't have libm, or don't need it 4609 ;; 4610*-ncr-sysv4.3*) 4611 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 4612 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 4613 ;; 4614*) 4615 AC_CHECK_LIB(m, cos, LIBM="-lm") 4616 ;; 4617esac 4618])# AC_CHECK_LIBM 4619 4620 4621# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 4622# ----------------------------------- 4623# sets LIBLTDL to the link flags for the libltdl convenience library and 4624# LTDLINCL to the include flags for the libltdl header and adds 4625# --enable-ltdl-convenience to the configure arguments. Note that 4626# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 4627# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 4628# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 4629# (note the single quotes!). If your package is not flat and you're not 4630# using automake, define top_builddir and top_srcdir appropriately in 4631# the Makefiles. 4632AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 4633[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4634 case $enable_ltdl_convenience in 4635 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 4636 "") enable_ltdl_convenience=yes 4637 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 4638 esac 4639 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 4640 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4641 # For backwards non-gettext consistent compatibility... 4642 INCLTDL="$LTDLINCL" 4643])# AC_LIBLTDL_CONVENIENCE 4644 4645 4646# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 4647# ----------------------------------- 4648# sets LIBLTDL to the link flags for the libltdl installable library and 4649# LTDLINCL to the include flags for the libltdl header and adds 4650# --enable-ltdl-install to the configure arguments. Note that 4651# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 4652# and an installed libltdl is not found, it is assumed to be `libltdl'. 4653# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 4654# '${top_srcdir}/' (note the single quotes!). If your package is not 4655# flat and you're not using automake, define top_builddir and top_srcdir 4656# appropriately in the Makefiles. 4657# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 4658AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 4659[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 4660 AC_CHECK_LIB(ltdl, lt_dlinit, 4661 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 4662 [if test x"$enable_ltdl_install" = xno; then 4663 AC_MSG_WARN([libltdl not installed, but installation disabled]) 4664 else 4665 enable_ltdl_install=yes 4666 fi 4667 ]) 4668 if test x"$enable_ltdl_install" = x"yes"; then 4669 ac_configure_args="$ac_configure_args --enable-ltdl-install" 4670 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 4671 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 4672 else 4673 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 4674 LIBLTDL="-lltdl" 4675 LTDLINCL= 4676 fi 4677 # For backwards non-gettext consistent compatibility... 4678 INCLTDL="$LTDLINCL" 4679])# AC_LIBLTDL_INSTALLABLE 4680 4681 4682# AC_LIBTOOL_CXX 4683# -------------- 4684# enable support for C++ libraries 4685AC_DEFUN([AC_LIBTOOL_CXX], 4686[AC_REQUIRE([_LT_AC_LANG_CXX]) 4687])# AC_LIBTOOL_CXX 4688 4689 4690# _LT_AC_LANG_CXX 4691# --------------- 4692AC_DEFUN([_LT_AC_LANG_CXX], 4693[AC_REQUIRE([AC_PROG_CXX]) 4694AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4695_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 4696])# _LT_AC_LANG_CXX 4697 4698# _LT_AC_PROG_CXXCPP 4699# ------------------ 4700AC_DEFUN([_LT_AC_PROG_CXXCPP], 4701[ 4702AC_REQUIRE([AC_PROG_CXX]) 4703if test -n "$CXX" && ( test "X$CXX" != "Xno" && 4704 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 4705 (test "X$CXX" != "Xg++"))) ; then 4706 AC_PROG_CXXCPP 4707fi 4708])# _LT_AC_PROG_CXXCPP 4709 4710# AC_LIBTOOL_F77 4711# -------------- 4712# enable support for Fortran 77 libraries 4713AC_DEFUN([AC_LIBTOOL_F77], 4714[AC_REQUIRE([_LT_AC_LANG_F77]) 4715])# AC_LIBTOOL_F77 4716 4717 4718# _LT_AC_LANG_F77 4719# --------------- 4720AC_DEFUN([_LT_AC_LANG_F77], 4721[AC_REQUIRE([AC_PROG_F77]) 4722_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 4723])# _LT_AC_LANG_F77 4724 4725 4726# AC_LIBTOOL_GCJ 4727# -------------- 4728# enable support for GCJ libraries 4729AC_DEFUN([AC_LIBTOOL_GCJ], 4730[AC_REQUIRE([_LT_AC_LANG_GCJ]) 4731])# AC_LIBTOOL_GCJ 4732 4733 4734# _LT_AC_LANG_GCJ 4735# --------------- 4736AC_DEFUN([_LT_AC_LANG_GCJ], 4737[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 4738 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 4739 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 4740 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 4741 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 4742 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 4743_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 4744])# _LT_AC_LANG_GCJ 4745 4746 4747# AC_LIBTOOL_RC 4748# ------------- 4749# enable support for Windows resource files 4750AC_DEFUN([AC_LIBTOOL_RC], 4751[AC_REQUIRE([LT_AC_PROG_RC]) 4752_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 4753])# AC_LIBTOOL_RC 4754 4755 4756# AC_LIBTOOL_LANG_C_CONFIG 4757# ------------------------ 4758# Ensure that the configuration vars for the C compiler are 4759# suitably defined. Those variables are subsequently used by 4760# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4761AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 4762AC_DEFUN([_LT_AC_LANG_C_CONFIG], 4763[lt_save_CC="$CC" 4764AC_LANG_PUSH(C) 4765 4766# Source file extension for C test sources. 4767ac_ext=c 4768 4769# Object file extension for compiled C test sources. 4770objext=o 4771_LT_AC_TAGVAR(objext, $1)=$objext 4772 4773# Code to be used in simple compile tests 4774lt_simple_compile_test_code="int some_variable = 0;\n" 4775 4776# Code to be used in simple link tests 4777lt_simple_link_test_code='int main(){return(0);}\n' 4778 4779_LT_AC_SYS_COMPILER 4780 4781# save warnings/boilerplate of simple test code 4782_LT_COMPILER_BOILERPLATE 4783_LT_LINKER_BOILERPLATE 4784 4785AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 4786AC_LIBTOOL_PROG_COMPILER_PIC($1) 4787AC_LIBTOOL_PROG_CC_C_O($1) 4788AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 4789AC_LIBTOOL_PROG_LD_SHLIBS($1) 4790AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 4791AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 4792AC_LIBTOOL_SYS_LIB_STRIP 4793AC_LIBTOOL_DLOPEN_SELF 4794 4795# Report which library types will actually be built 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 ;; 4812 4813aix4* | aix5*) 4814 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 4815 test "$enable_shared" = yes && enable_static=no 4816 fi 4817 ;; 4818esac 4819AC_MSG_RESULT([$enable_shared]) 4820 4821AC_MSG_CHECKING([whether to build static libraries]) 4822# Make sure either enable_shared or enable_static is yes. 4823test "$enable_shared" = yes || enable_static=yes 4824AC_MSG_RESULT([$enable_static]) 4825 4826AC_LIBTOOL_CONFIG($1) 4827 4828AC_LANG_POP 4829CC="$lt_save_CC" 4830])# AC_LIBTOOL_LANG_C_CONFIG 4831 4832 4833# AC_LIBTOOL_LANG_CXX_CONFIG 4834# -------------------------- 4835# Ensure that the configuration vars for the C compiler are 4836# suitably defined. Those variables are subsequently used by 4837# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 4838AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 4839AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 4840[AC_LANG_PUSH(C++) 4841AC_REQUIRE([AC_PROG_CXX]) 4842AC_REQUIRE([_LT_AC_PROG_CXXCPP]) 4843 4844_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 4845_LT_AC_TAGVAR(allow_undefined_flag, $1)= 4846_LT_AC_TAGVAR(always_export_symbols, $1)=no 4847_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 4848_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 4849_LT_AC_TAGVAR(hardcode_direct, $1)=no 4850_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 4851_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4852_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 4853_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 4854_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4855_LT_AC_TAGVAR(hardcode_automatic, $1)=no 4856_LT_AC_TAGVAR(module_cmds, $1)= 4857_LT_AC_TAGVAR(module_expsym_cmds, $1)= 4858_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 4859_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 4860_LT_AC_TAGVAR(no_undefined_flag, $1)= 4861_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4862_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4863 4864# Dependencies to place before and after the object being linked: 4865_LT_AC_TAGVAR(predep_objects, $1)= 4866_LT_AC_TAGVAR(postdep_objects, $1)= 4867_LT_AC_TAGVAR(predeps, $1)= 4868_LT_AC_TAGVAR(postdeps, $1)= 4869_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 4870 4871# Source file extension for C++ test sources. 4872ac_ext=cpp 4873 4874# Object file extension for compiled C++ test sources. 4875objext=o 4876_LT_AC_TAGVAR(objext, $1)=$objext 4877 4878# Code to be used in simple compile tests 4879lt_simple_compile_test_code="int some_variable = 0;\n" 4880 4881# Code to be used in simple link tests 4882lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' 4883 4884# ltmain only uses $CC for tagged configurations so make sure $CC is set. 4885_LT_AC_SYS_COMPILER 4886 4887# save warnings/boilerplate of simple test code 4888_LT_COMPILER_BOILERPLATE 4889_LT_LINKER_BOILERPLATE 4890 4891# Allow CC to be a program name with arguments. 4892lt_save_CC=$CC 4893lt_save_LD=$LD 4894lt_save_GCC=$GCC 4895GCC=$GXX 4896lt_save_with_gnu_ld=$with_gnu_ld 4897lt_save_path_LD=$lt_cv_path_LD 4898if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 4899 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 4900else 4901 $as_unset lt_cv_prog_gnu_ld 4902fi 4903if test -n "${lt_cv_path_LDCXX+set}"; then 4904 lt_cv_path_LD=$lt_cv_path_LDCXX 4905else 4906 $as_unset lt_cv_path_LD 4907fi 4908test -z "${LDCXX+set}" || LD=$LDCXX 4909CC=${CXX-"c++"} 4910compiler=$CC 4911_LT_AC_TAGVAR(compiler, $1)=$CC 4912_LT_CC_BASENAME([$compiler]) 4913 4914# We don't want -fno-exception wen compiling C++ code, so set the 4915# no_builtin_flag separately 4916if test "$GXX" = yes; then 4917 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 4918else 4919 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4920fi 4921 4922if test "$GXX" = yes; then 4923 # Set up default GNU C++ configuration 4924 4925 AC_PROG_LD 4926 4927 # Check if GNU C++ uses GNU ld as the underlying linker, since the 4928 # archiving commands below assume that GNU ld is being used. 4929 if test "$with_gnu_ld" = yes; then 4930 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 4931 _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' 4932 4933 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 4934 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4935 4936 # If archive_cmds runs LD, not CC, wlarc should be empty 4937 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 4938 # investigate it a little bit more. (MM) 4939 wlarc='${wl}' 4940 4941 # ancient GNU ld didn't support --whole-archive et. al. 4942 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 4943 grep 'no-whole-archive' > /dev/null; then 4944 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4945 else 4946 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 4947 fi 4948 else 4949 with_gnu_ld=no 4950 wlarc= 4951 4952 # A generic and very simple default shared library creation 4953 # command for GNU C++ for the case where it uses the native 4954 # linker, instead of GNU ld. If possible, this setting should 4955 # overridden to take advantage of the native linker features on 4956 # the platform it is being used on. 4957 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 4958 fi 4959 4960 # Commands to make compiler produce verbose output that lists 4961 # what "hidden" libraries, object files and flags are used when 4962 # linking a shared library. 4963 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 4964 4965else 4966 GXX=no 4967 with_gnu_ld=no 4968 wlarc= 4969fi 4970 4971# PORTME: fill in a description of your system's C++ link characteristics 4972AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4973_LT_AC_TAGVAR(ld_shlibs, $1)=yes 4974case $host_os in 4975 aix3*) 4976 # FIXME: insert proper C++ library support 4977 _LT_AC_TAGVAR(ld_shlibs, $1)=no 4978 ;; 4979 aix4* | aix5*) 4980 if test "$host_cpu" = ia64; then 4981 # On IA64, the linker does run time linking by default, so we don't 4982 # have to do anything special. 4983 aix_use_runtimelinking=no 4984 exp_sym_flag='-Bexport' 4985 no_entry_flag="" 4986 else 4987 aix_use_runtimelinking=no 4988 4989 # Test if we are trying to use run time linking or normal 4990 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4991 # need to do runtime linking. 4992 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 4993 for ld_flag in $LDFLAGS; do 4994 case $ld_flag in 4995 *-brtl*) 4996 aix_use_runtimelinking=yes 4997 break 4998 ;; 4999 esac 5000 done 5001 ;; 5002 esac 5003 5004 exp_sym_flag='-bexport' 5005 no_entry_flag='-bnoentry' 5006 fi 5007 5008 # When large executables or shared objects are built, AIX ld can 5009 # have problems creating the table of contents. If linking a library 5010 # or program results in "error TOC overflow" add -mminimal-toc to 5011 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5012 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5013 5014 _LT_AC_TAGVAR(archive_cmds, $1)='' 5015 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5016 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5017 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5018 5019 if test "$GXX" = yes; then 5020 case $host_os in aix4.[[012]]|aix4.[[012]].*) 5021 # We only want to do this on AIX 4.2 and lower, the check 5022 # below for broken collect2 doesn't work under 4.3+ 5023 collect2name=`${CC} -print-prog-name=collect2` 5024 if test -f "$collect2name" && \ 5025 strings "$collect2name" | grep resolve_lib_name >/dev/null 5026 then 5027 # We have reworked collect2 5028 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5029 else 5030 # We have old collect2 5031 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 5032 # It fails to find uninstalled libraries when the uninstalled 5033 # path is not listed in the libpath. Setting hardcode_minus_L 5034 # to unsupported forces relinking 5035 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 5036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5037 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 5038 fi 5039 ;; 5040 esac 5041 shared_flag='-shared' 5042 if test "$aix_use_runtimelinking" = yes; then 5043 shared_flag="$shared_flag "'${wl}-G' 5044 fi 5045 else 5046 # not using gcc 5047 if test "$host_cpu" = ia64; then 5048 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5049 # chokes on -Wl,-G. The following line is correct: 5050 shared_flag='-G' 5051 else 5052 if test "$aix_use_runtimelinking" = yes; then 5053 shared_flag='${wl}-G' 5054 else 5055 shared_flag='${wl}-bM:SRE' 5056 fi 5057 fi 5058 fi 5059 5060 # It seems that -bexpall does not export symbols beginning with 5061 # underscore (_), so it is better to generate a list of symbols to export. 5062 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 5063 if test "$aix_use_runtimelinking" = yes; then 5064 # Warning - without using the other runtime loading flags (-brtl), 5065 # -berok will link without error, but may produce a broken library. 5066 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 5067 # Determine the default libpath from the value encoded in an empty executable. 5068 _LT_AC_SYS_LIBPATH_AIX 5069 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5070 5071 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5072 else 5073 if test "$host_cpu" = ia64; then 5074 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5075 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5076 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 5077 else 5078 # Determine the default libpath from the value encoded in an empty executable. 5079 _LT_AC_SYS_LIBPATH_AIX 5080 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5081 # Warning - without using the other run time loading flags, 5082 # -berok will link without error, but may produce a broken library. 5083 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5084 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5085 # Exported symbols can be pulled into shared objects from archives 5086 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5087 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 5088 # This is similar to how AIX traditionally builds its shared libraries. 5089 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5090 fi 5091 fi 5092 ;; 5093 5094 beos*) 5095 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 5096 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5097 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5098 # support --undefined. This deserves some investigation. FIXME 5099 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5100 else 5101 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5102 fi 5103 ;; 5104 5105 chorus*) 5106 case $cc_basename in 5107 *) 5108 # FIXME: insert proper C++ library support 5109 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5110 ;; 5111 esac 5112 ;; 5113 5114 cygwin* | mingw* | pw32*) 5115 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5116 # as there is no search path for DLLs. 5117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5118 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 5119 _LT_AC_TAGVAR(always_export_symbols, $1)=no 5120 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5121 5122 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 5123 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5124 # If the export-symbols file already is a .def file (1st line 5125 # is EXPORTS), use it as is; otherwise, prepend... 5126 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5127 cp $export_symbols $output_objdir/$soname.def; 5128 else 5129 echo EXPORTS > $output_objdir/$soname.def; 5130 cat $export_symbols >> $output_objdir/$soname.def; 5131 fi~ 5132 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5133 else 5134 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5135 fi 5136 ;; 5137 darwin* | rhapsody*) 5138 case $host_os in 5139 rhapsody* | darwin1.[[012]]) 5140 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 5141 ;; 5142 *) # Darwin 1.3 on 5143 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 5144 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5145 else 5146 case ${MACOSX_DEPLOYMENT_TARGET} in 5147 10.[[012]]) 5148 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 5149 ;; 5150 10.*) 5151 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 5152 ;; 5153 esac 5154 fi 5155 ;; 5156 esac 5157 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5158 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5159 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 5160 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5161 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 5162 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5163 5164 if test "$GXX" = yes ; then 5165 lt_int_apple_cc_single_mod=no 5166 output_verbose_link_cmd='echo' 5167 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then 5168 lt_int_apple_cc_single_mod=yes 5169 fi 5170 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5171 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 5172 else 5173 _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' 5174 fi 5175 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5176 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5177 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then 5178 _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}' 5179 else 5180 _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}' 5181 fi 5182 _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}' 5183 else 5184 case $cc_basename in 5185 xlc*) 5186 output_verbose_link_cmd='echo' 5187 _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' 5188 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 5189 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 5190 _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}' 5191 _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}' 5192 ;; 5193 *) 5194 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5195 ;; 5196 esac 5197 fi 5198 ;; 5199 5200 dgux*) 5201 case $cc_basename in 5202 ec++*) 5203 # FIXME: insert proper C++ library support 5204 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5205 ;; 5206 ghcx*) 5207 # Green Hills C++ Compiler 5208 # FIXME: insert proper C++ library support 5209 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5210 ;; 5211 *) 5212 # FIXME: insert proper C++ library support 5213 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5214 ;; 5215 esac 5216 ;; 5217 freebsd[[12]]*) 5218 # C++ shared libraries reported to be fairly broken before switch to ELF 5219 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5220 ;; 5221 freebsd-elf*) 5222 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5223 ;; 5224 freebsd* | kfreebsd*-gnu | dragonfly*) 5225 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5226 # conventions 5227 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 5228 ;; 5229 gnu*) 5230 ;; 5231 hpux9*) 5232 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5233 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5234 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5235 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5236 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5237 # but as the default 5238 # location of the library. 5239 5240 case $cc_basename in 5241 CC*) 5242 # FIXME: insert proper C++ library support 5243 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5244 ;; 5245 aCC*) 5246 _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' 5247 # Commands to make compiler produce verbose output that lists 5248 # what "hidden" libraries, object files and flags are used when 5249 # linking a shared library. 5250 # 5251 # There doesn't appear to be a way to prevent this compiler from 5252 # explicitly linking system object files so we need to strip them 5253 # from the output so that they don't get included in the library 5254 # dependencies. 5255 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' 5256 ;; 5257 *) 5258 if test "$GXX" = yes; then 5259 _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' 5260 else 5261 # FIXME: insert proper C++ library support 5262 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5263 fi 5264 ;; 5265 esac 5266 ;; 5267 hpux10*|hpux11*) 5268 if test $with_gnu_ld = no; then 5269 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5270 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5271 5272 case $host_cpu in 5273 hppa*64*|ia64*) 5274 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5275 ;; 5276 *) 5277 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5278 ;; 5279 esac 5280 fi 5281 case $host_cpu in 5282 hppa*64*|ia64*) 5283 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5284 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5285 ;; 5286 *) 5287 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5288 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5289 # but as the default 5290 # location of the library. 5291 ;; 5292 esac 5293 5294 case $cc_basename in 5295 CC*) 5296 # FIXME: insert proper C++ library support 5297 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5298 ;; 5299 aCC*) 5300 case $host_cpu in 5301 hppa*64*) 5302 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5303 ;; 5304 ia64*) 5305 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5306 ;; 5307 *) 5308 _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' 5309 ;; 5310 esac 5311 # Commands to make compiler produce verbose output that lists 5312 # what "hidden" libraries, object files and flags are used when 5313 # linking a shared library. 5314 # 5315 # There doesn't appear to be a way to prevent this compiler from 5316 # explicitly linking system object files so we need to strip them 5317 # from the output so that they don't get included in the library 5318 # dependencies. 5319 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' 5320 ;; 5321 *) 5322 if test "$GXX" = yes; then 5323 if test $with_gnu_ld = no; then 5324 case $host_cpu in 5325 hppa*64*) 5326 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5327 ;; 5328 ia64*) 5329 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5330 ;; 5331 *) 5332 _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' 5333 ;; 5334 esac 5335 fi 5336 else 5337 # FIXME: insert proper C++ library support 5338 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5339 fi 5340 ;; 5341 esac 5342 ;; 5343 interix3*) 5344 _LT_AC_TAGVAR(hardcode_direct, $1)=no 5345 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5346 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5347 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5348 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5349 # Instead, shared libraries are loaded at an image base (0x10000000 by 5350 # default) and relocated if they conflict, which is a slow very memory 5351 # consuming and fragmenting process. To avoid this, we pick a random, 5352 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5353 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5354 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5355 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 5356 ;; 5357 irix5* | irix6*) 5358 case $cc_basename in 5359 CC*) 5360 # SGI C++ 5361 _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' 5362 5363 # Archives containing C++ object files must be created using 5364 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5365 # necessary to make sure instantiated templates are included 5366 # in the archive. 5367 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5368 ;; 5369 *) 5370 if test "$GXX" = yes; then 5371 if test "$with_gnu_ld" = no; then 5372 _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' 5373 else 5374 _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' 5375 fi 5376 fi 5377 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5378 ;; 5379 esac 5380 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5381 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5382 ;; 5383 linux*) 5384 case $cc_basename in 5385 KCC*) 5386 # Kuck and Associates, Inc. (KAI) C++ Compiler 5387 5388 # KCC will only create a shared library if the output file 5389 # ends with ".so" (or ".sl" for HP-UX), so rename the library 5390 # to its proper name (with version) after linking. 5391 _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' 5392 _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' 5393 # Commands to make compiler produce verbose output that lists 5394 # what "hidden" libraries, object files and flags are used when 5395 # linking a shared library. 5396 # 5397 # There doesn't appear to be a way to prevent this compiler from 5398 # explicitly linking system object files so we need to strip them 5399 # from the output so that they don't get included in the library 5400 # dependencies. 5401 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' 5402 5403 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 5404 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5405 5406 # Archives containing C++ object files must be created using 5407 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5408 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5409 ;; 5410 icpc*) 5411 # Intel C++ 5412 with_gnu_ld=yes 5413 # version 8.0 and above of icpc choke on multiply defined symbols 5414 # if we add $predep_objects and $postdep_objects, however 7.1 and 5415 # earlier do not add the objects themselves. 5416 case `$CC -V 2>&1` in 5417 *"Version 7."*) 5418 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5419 _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' 5420 ;; 5421 *) # Version 8.0 or newer 5422 tmp_idyn= 5423 case $host_cpu in 5424 ia64*) tmp_idyn=' -i_dynamic';; 5425 esac 5426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5427 _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' 5428 ;; 5429 esac 5430 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5431 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5432 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5433 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5434 ;; 5435 pgCC*) 5436 # Portland Group C++ compiler 5437 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5438 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 5439 5440 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5441 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5442 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 5443 ;; 5444 cxx*) 5445 # Compaq C++ 5446 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5447 _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' 5448 5449 runpath_var=LD_RUN_PATH 5450 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5451 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5452 5453 # Commands to make compiler produce verbose output that lists 5454 # what "hidden" libraries, object files and flags are used when 5455 # linking a shared library. 5456 # 5457 # There doesn't appear to be a way to prevent this compiler from 5458 # explicitly linking system object files so we need to strip them 5459 # from the output so that they don't get included in the library 5460 # dependencies. 5461 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' 5462 ;; 5463 esac 5464 ;; 5465 lynxos*) 5466 # FIXME: insert proper C++ library support 5467 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5468 ;; 5469 m88k*) 5470 # FIXME: insert proper C++ library support 5471 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5472 ;; 5473 mvs*) 5474 case $cc_basename in 5475 cxx*) 5476 # FIXME: insert proper C++ library support 5477 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5478 ;; 5479 *) 5480 # FIXME: insert proper C++ library support 5481 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5482 ;; 5483 esac 5484 ;; 5485 netbsd*) 5486 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 5487 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 5488 wlarc= 5489 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5490 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5491 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5492 fi 5493 # Workaround some broken pre-1.5 toolchains 5494 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 5495 ;; 5496 openbsd2*) 5497 # C++ shared libraries are fairly broken 5498 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5499 ;; 5500 openbsd*) 5501 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 5502 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5503 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5504 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5505 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5506 _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' 5507 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5508 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5509 fi 5510 output_verbose_link_cmd='echo' 5511 ;; 5512 osf3*) 5513 case $cc_basename in 5514 KCC*) 5515 # Kuck and Associates, Inc. (KAI) C++ Compiler 5516 5517 # KCC will only create a shared library if the output file 5518 # ends with ".so" (or ".sl" for HP-UX), so rename the library 5519 # to its proper name (with version) after linking. 5520 _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' 5521 5522 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5523 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5524 5525 # Archives containing C++ object files must be created using 5526 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5527 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5528 5529 ;; 5530 RCC*) 5531 # Rational C++ 2.4.1 5532 # FIXME: insert proper C++ library support 5533 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5534 ;; 5535 cxx*) 5536 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5537 _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' 5538 5539 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5540 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5541 5542 # Commands to make compiler produce verbose output that lists 5543 # what "hidden" libraries, object files and flags are used when 5544 # linking a shared library. 5545 # 5546 # There doesn't appear to be a way to prevent this compiler from 5547 # explicitly linking system object files so we need to strip them 5548 # from the output so that they don't get included in the library 5549 # dependencies. 5550 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' 5551 ;; 5552 *) 5553 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5554 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5555 _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' 5556 5557 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5558 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5559 5560 # Commands to make compiler produce verbose output that lists 5561 # what "hidden" libraries, object files and flags are used when 5562 # linking a shared library. 5563 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 5564 5565 else 5566 # FIXME: insert proper C++ library support 5567 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5568 fi 5569 ;; 5570 esac 5571 ;; 5572 osf4* | osf5*) 5573 case $cc_basename in 5574 KCC*) 5575 # Kuck and Associates, Inc. (KAI) C++ Compiler 5576 5577 # KCC will only create a shared library if the output file 5578 # ends with ".so" (or ".sl" for HP-UX), so rename the library 5579 # to its proper name (with version) after linking. 5580 _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' 5581 5582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5583 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5584 5585 # Archives containing C++ object files must be created using 5586 # the KAI C++ compiler. 5587 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 5588 ;; 5589 RCC*) 5590 # Rational C++ 2.4.1 5591 # FIXME: insert proper C++ library support 5592 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5593 ;; 5594 cxx*) 5595 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5596 _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' 5597 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 5598 echo "-hidden">> $lib.exp~ 5599 $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~ 5600 $rm $lib.exp' 5601 5602 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5603 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5604 5605 # Commands to make compiler produce verbose output that lists 5606 # what "hidden" libraries, object files and flags are used when 5607 # linking a shared library. 5608 # 5609 # There doesn't appear to be a way to prevent this compiler from 5610 # explicitly linking system object files so we need to strip them 5611 # from the output so that they don't get included in the library 5612 # dependencies. 5613 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' 5614 ;; 5615 *) 5616 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5617 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5618 _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' 5619 5620 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5621 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 5622 5623 # Commands to make compiler produce verbose output that lists 5624 # what "hidden" libraries, object files and flags are used when 5625 # linking a shared library. 5626 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 5627 5628 else 5629 # FIXME: insert proper C++ library support 5630 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5631 fi 5632 ;; 5633 esac 5634 ;; 5635 psos*) 5636 # FIXME: insert proper C++ library support 5637 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5638 ;; 5639 sunos4*) 5640 case $cc_basename in 5641 CC*) 5642 # Sun C++ 4.x 5643 # FIXME: insert proper C++ library support 5644 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5645 ;; 5646 lcc*) 5647 # Lucid 5648 # FIXME: insert proper C++ library support 5649 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5650 ;; 5651 *) 5652 # FIXME: insert proper C++ library support 5653 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5654 ;; 5655 esac 5656 ;; 5657 solaris*) 5658 case $cc_basename in 5659 CC*) 5660 # Sun C++ 4.2, 5.x and Centerline C++ 5661 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 5662 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5663 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5664 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5665 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 5666 5667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5668 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5669 case $host_os in 5670 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5671 *) 5672 # The C++ compiler is used as linker so we must use $wl 5673 # flag to pass the commands to the underlying system 5674 # linker. We must also pass each convience library through 5675 # to the system linker between allextract/defaultextract. 5676 # The C++ compiler will combine linker options so we 5677 # cannot just pass the convience library names through 5678 # without $wl. 5679 # Supported since Solaris 2.6 (maybe 2.5.1?) 5680 _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' 5681 ;; 5682 esac 5683 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5684 5685 output_verbose_link_cmd='echo' 5686 5687 # Archives containing C++ object files must be created using 5688 # "CC -xar", where "CC" is the Sun C++ compiler. This is 5689 # necessary to make sure instantiated templates are included 5690 # in the archive. 5691 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5692 ;; 5693 gcx*) 5694 # Green Hills C++ Compiler 5695 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5696 5697 # The C++ compiler must be used to create the archive. 5698 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 5699 ;; 5700 *) 5701 # GNU C++ compiler with Solaris linker 5702 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 5703 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 5704 if $CC --version | grep -v '^2\.7' > /dev/null; then 5705 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5706 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5707 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 5708 5709 # Commands to make compiler produce verbose output that lists 5710 # what "hidden" libraries, object files and flags are used when 5711 # linking a shared library. 5712 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 5713 else 5714 # g++ 2.7 appears to require `-G' NOT `-shared' on this 5715 # platform. 5716 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 5717 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 5718 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 5719 5720 # Commands to make compiler produce verbose output that lists 5721 # what "hidden" libraries, object files and flags are used when 5722 # linking a shared library. 5723 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 5724 fi 5725 5726 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 5727 fi 5728 ;; 5729 esac 5730 ;; 5731 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5732 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5733 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5734 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5735 runpath_var='LD_RUN_PATH' 5736 5737 case $cc_basename in 5738 CC*) 5739 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5740 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5741 ;; 5742 *) 5743 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5744 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5745 ;; 5746 esac 5747 ;; 5748 sysv5* | sco3.2v5* | sco5v6*) 5749 # Note: We can NOT use -z defs as we might desire, because we do not 5750 # link with -lc, and that would cause any symbols used from libc to 5751 # always be unresolved, which means just about no library would 5752 # ever link correctly. If we're not using GNU ld we use -z text 5753 # though, which does catch some bad symbols but isn't as heavy-handed 5754 # as -z defs. 5755 # For security reasons, it is highly recommended that you always 5756 # use absolute paths for naming shared libraries, and exclude the 5757 # DT_RUNPATH tag from executables and libraries. But doing so 5758 # requires that you compile everything twice, which is a pain. 5759 # So that behaviour is only enabled if SCOABSPATH is set to a 5760 # non-empty value in the environment. Most likely only useful for 5761 # creating official distributions of packages. 5762 # This is a hack until libtool officially supports absolute path 5763 # names for shared libraries. 5764 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5765 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5766 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 5767 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 5768 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 5769 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 5770 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 5771 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5772 runpath_var='LD_RUN_PATH' 5773 5774 case $cc_basename in 5775 CC*) 5776 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5777 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5778 ;; 5779 *) 5780 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5781 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 5782 ;; 5783 esac 5784 ;; 5785 tandem*) 5786 case $cc_basename in 5787 NCC*) 5788 # NonStop-UX NCC 3.20 5789 # FIXME: insert proper C++ library support 5790 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5791 ;; 5792 *) 5793 # FIXME: insert proper C++ library support 5794 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5795 ;; 5796 esac 5797 ;; 5798 vxworks*) 5799 # FIXME: insert proper C++ library support 5800 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5801 ;; 5802 *) 5803 # FIXME: insert proper C++ library support 5804 _LT_AC_TAGVAR(ld_shlibs, $1)=no 5805 ;; 5806esac 5807AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 5808test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5809 5810_LT_AC_TAGVAR(GCC, $1)="$GXX" 5811_LT_AC_TAGVAR(LD, $1)="$LD" 5812 5813AC_LIBTOOL_POSTDEP_PREDEP($1) 5814AC_LIBTOOL_PROG_COMPILER_PIC($1) 5815AC_LIBTOOL_PROG_CC_C_O($1) 5816AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 5817AC_LIBTOOL_PROG_LD_SHLIBS($1) 5818AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 5819AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 5820 5821AC_LIBTOOL_CONFIG($1) 5822 5823AC_LANG_POP 5824CC=$lt_save_CC 5825LDCXX=$LD 5826LD=$lt_save_LD 5827GCC=$lt_save_GCC 5828with_gnu_ldcxx=$with_gnu_ld 5829with_gnu_ld=$lt_save_with_gnu_ld 5830lt_cv_path_LDCXX=$lt_cv_path_LD 5831lt_cv_path_LD=$lt_save_path_LD 5832lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 5833lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 5834])# AC_LIBTOOL_LANG_CXX_CONFIG 5835 5836# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 5837# ------------------------------------ 5838# Figure out "hidden" library dependencies from verbose 5839# compiler output when linking a shared library. 5840# Parse the compiler output and extract the necessary 5841# objects, libraries and library flags. 5842AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ 5843dnl we can't use the lt_simple_compile_test_code here, 5844dnl because it contains code intended for an executable, 5845dnl not a library. It's possible we should let each 5846dnl tag define a new lt_????_link_test_code variable, 5847dnl but it's only used here... 5848ifelse([$1],[],[cat > conftest.$ac_ext <<EOF 5849int a; 5850void foo (void) { a = 0; } 5851EOF 5852],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 5853class Foo 5854{ 5855public: 5856 Foo (void) { a = 0; } 5857private: 5858 int a; 5859}; 5860EOF 5861],[$1],[F77],[cat > conftest.$ac_ext <<EOF 5862 subroutine foo 5863 implicit none 5864 integer*4 a 5865 a=0 5866 return 5867 end 5868EOF 5869],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 5870public class foo { 5871 private int a; 5872 public void bar (void) { 5873 a = 0; 5874 } 5875}; 5876EOF 5877]) 5878dnl Parse the compiler output and extract the necessary 5879dnl objects, libraries and library flags. 5880if AC_TRY_EVAL(ac_compile); then 5881 # Parse the compiler output and extract the necessary 5882 # objects, libraries and library flags. 5883 5884 # Sentinel used to keep track of whether or not we are before 5885 # the conftest object file. 5886 pre_test_object_deps_done=no 5887 5888 # The `*' in the case matches for architectures that use `case' in 5889 # $output_verbose_cmd can trigger glob expansion during the loop 5890 # eval without this substitution. 5891 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 5892 5893 for p in `eval $output_verbose_link_cmd`; do 5894 case $p in 5895 5896 -L* | -R* | -l*) 5897 # Some compilers place space between "-{L,R}" and the path. 5898 # Remove the space. 5899 if test $p = "-L" \ 5900 || test $p = "-R"; then 5901 prev=$p 5902 continue 5903 else 5904 prev= 5905 fi 5906 5907 if test "$pre_test_object_deps_done" = no; then 5908 case $p in 5909 -L* | -R*) 5910 # Internal compiler library paths should come after those 5911 # provided the user. The postdeps already come after the 5912 # user supplied libs so there is no need to process them. 5913 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 5914 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 5915 else 5916 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 5917 fi 5918 ;; 5919 # The "-l" case would never come before the object being 5920 # linked, so don't bother handling this case. 5921 esac 5922 else 5923 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 5924 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 5925 else 5926 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 5927 fi 5928 fi 5929 ;; 5930 5931 *.$objext) 5932 # This assumes that the test object file only shows up 5933 # once in the compiler output. 5934 if test "$p" = "conftest.$objext"; then 5935 pre_test_object_deps_done=yes 5936 continue 5937 fi 5938 5939 if test "$pre_test_object_deps_done" = no; then 5940 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 5941 _LT_AC_TAGVAR(predep_objects, $1)="$p" 5942 else 5943 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 5944 fi 5945 else 5946 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 5947 _LT_AC_TAGVAR(postdep_objects, $1)="$p" 5948 else 5949 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 5950 fi 5951 fi 5952 ;; 5953 5954 *) ;; # Ignore the rest. 5955 5956 esac 5957 done 5958 5959 # Clean up. 5960 rm -f a.out a.exe 5961else 5962 echo "libtool.m4: error: problem compiling $1 test program" 5963fi 5964 5965$rm -f confest.$objext 5966 5967# PORTME: override above test on systems where it is broken 5968ifelse([$1],[CXX], 5969[case $host_os in 5970interix3*) 5971 # Interix 3.5 installs completely hosed .la files for C++, so rather than 5972 # hack all around it, let's just trust "g++" to DTRT. 5973 _LT_AC_TAGVAR(predep_objects,$1)= 5974 _LT_AC_TAGVAR(postdep_objects,$1)= 5975 _LT_AC_TAGVAR(postdeps,$1)= 5976 ;; 5977 5978solaris*) 5979 case $cc_basename in 5980 CC*) 5981 # Adding this requires a known-good setup of shared libraries for 5982 # Sun compiler versions before 5.6, else PIC objects from an old 5983 # archive will be linked into the output, leading to subtle bugs. 5984 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' 5985 ;; 5986 esac 5987 ;; 5988esac 5989]) 5990 5991case " $_LT_AC_TAGVAR(postdeps, $1) " in 5992*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 5993esac 5994])# AC_LIBTOOL_POSTDEP_PREDEP 5995 5996# AC_LIBTOOL_LANG_F77_CONFIG 5997# -------------------------- 5998# Ensure that the configuration vars for the C compiler are 5999# suitably defined. Those variables are subsequently used by 6000# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6001AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 6002AC_DEFUN([_LT_AC_LANG_F77_CONFIG], 6003[AC_REQUIRE([AC_PROG_F77]) 6004AC_LANG_PUSH(Fortran 77) 6005 6006_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6007_LT_AC_TAGVAR(allow_undefined_flag, $1)= 6008_LT_AC_TAGVAR(always_export_symbols, $1)=no 6009_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 6010_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 6011_LT_AC_TAGVAR(hardcode_direct, $1)=no 6012_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 6013_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6014_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 6015_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 6016_LT_AC_TAGVAR(hardcode_automatic, $1)=no 6017_LT_AC_TAGVAR(module_cmds, $1)= 6018_LT_AC_TAGVAR(module_expsym_cmds, $1)= 6019_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 6020_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6021_LT_AC_TAGVAR(no_undefined_flag, $1)= 6022_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 6023_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6024 6025# Source file extension for f77 test sources. 6026ac_ext=f 6027 6028# Object file extension for compiled f77 test sources. 6029objext=o 6030_LT_AC_TAGVAR(objext, $1)=$objext 6031 6032# Code to be used in simple compile tests 6033lt_simple_compile_test_code=" subroutine t\n return\n end\n" 6034 6035# Code to be used in simple link tests 6036lt_simple_link_test_code=" program t\n end\n" 6037 6038# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6039_LT_AC_SYS_COMPILER 6040 6041# save warnings/boilerplate of simple test code 6042_LT_COMPILER_BOILERPLATE 6043_LT_LINKER_BOILERPLATE 6044 6045# Allow CC to be a program name with arguments. 6046lt_save_CC="$CC" 6047CC=${F77-"f77"} 6048compiler=$CC 6049_LT_AC_TAGVAR(compiler, $1)=$CC 6050_LT_CC_BASENAME([$compiler]) 6051 6052AC_MSG_CHECKING([if libtool supports shared libraries]) 6053AC_MSG_RESULT([$can_build_shared]) 6054 6055AC_MSG_CHECKING([whether to build shared libraries]) 6056test "$can_build_shared" = "no" && enable_shared=no 6057 6058# On AIX, shared libraries and static libraries use the same namespace, and 6059# are all built from PIC. 6060case $host_os in 6061aix3*) 6062 test "$enable_shared" = yes && enable_static=no 6063 if test -n "$RANLIB"; then 6064 archive_cmds="$archive_cmds~\$RANLIB \$lib" 6065 postinstall_cmds='$RANLIB $lib' 6066 fi 6067 ;; 6068aix4* | aix5*) 6069 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6070 test "$enable_shared" = yes && enable_static=no 6071 fi 6072 ;; 6073esac 6074AC_MSG_RESULT([$enable_shared]) 6075 6076AC_MSG_CHECKING([whether to build static libraries]) 6077# Make sure either enable_shared or enable_static is yes. 6078test "$enable_shared" = yes || enable_static=yes 6079AC_MSG_RESULT([$enable_static]) 6080 6081_LT_AC_TAGVAR(GCC, $1)="$G77" 6082_LT_AC_TAGVAR(LD, $1)="$LD" 6083 6084AC_LIBTOOL_PROG_COMPILER_PIC($1) 6085AC_LIBTOOL_PROG_CC_C_O($1) 6086AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 6087AC_LIBTOOL_PROG_LD_SHLIBS($1) 6088AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 6089AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 6090 6091AC_LIBTOOL_CONFIG($1) 6092 6093AC_LANG_POP 6094CC="$lt_save_CC" 6095])# AC_LIBTOOL_LANG_F77_CONFIG 6096 6097 6098# AC_LIBTOOL_LANG_GCJ_CONFIG 6099# -------------------------- 6100# Ensure that the configuration vars for the C compiler are 6101# suitably defined. Those variables are subsequently used by 6102# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6103AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 6104AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 6105[AC_LANG_SAVE 6106 6107# Source file extension for Java test sources. 6108ac_ext=java 6109 6110# Object file extension for compiled Java test sources. 6111objext=o 6112_LT_AC_TAGVAR(objext, $1)=$objext 6113 6114# Code to be used in simple compile tests 6115lt_simple_compile_test_code="class foo {}\n" 6116 6117# Code to be used in simple link tests 6118lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' 6119 6120# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6121_LT_AC_SYS_COMPILER 6122 6123# save warnings/boilerplate of simple test code 6124_LT_COMPILER_BOILERPLATE 6125_LT_LINKER_BOILERPLATE 6126 6127# Allow CC to be a program name with arguments. 6128lt_save_CC="$CC" 6129CC=${GCJ-"gcj"} 6130compiler=$CC 6131_LT_AC_TAGVAR(compiler, $1)=$CC 6132_LT_CC_BASENAME([$compiler]) 6133 6134# GCJ did not exist at the time GCC didn't implicitly link libc in. 6135_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 6136 6137_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6138 6139AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 6140AC_LIBTOOL_PROG_COMPILER_PIC($1) 6141AC_LIBTOOL_PROG_CC_C_O($1) 6142AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 6143AC_LIBTOOL_PROG_LD_SHLIBS($1) 6144AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 6145AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 6146 6147AC_LIBTOOL_CONFIG($1) 6148 6149AC_LANG_RESTORE 6150CC="$lt_save_CC" 6151])# AC_LIBTOOL_LANG_GCJ_CONFIG 6152 6153 6154# AC_LIBTOOL_LANG_RC_CONFIG 6155# ------------------------- 6156# Ensure that the configuration vars for the Windows resource compiler are 6157# suitably defined. Those variables are subsequently used by 6158# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 6159AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 6160AC_DEFUN([_LT_AC_LANG_RC_CONFIG], 6161[AC_LANG_SAVE 6162 6163# Source file extension for RC test sources. 6164ac_ext=rc 6165 6166# Object file extension for compiled RC test sources. 6167objext=o 6168_LT_AC_TAGVAR(objext, $1)=$objext 6169 6170# Code to be used in simple compile tests 6171lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' 6172 6173# Code to be used in simple link tests 6174lt_simple_link_test_code="$lt_simple_compile_test_code" 6175 6176# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6177_LT_AC_SYS_COMPILER 6178 6179# save warnings/boilerplate of simple test code 6180_LT_COMPILER_BOILERPLATE 6181_LT_LINKER_BOILERPLATE 6182 6183# Allow CC to be a program name with arguments. 6184lt_save_CC="$CC" 6185CC=${RC-"windres"} 6186compiler=$CC 6187_LT_AC_TAGVAR(compiler, $1)=$CC 6188_LT_CC_BASENAME([$compiler]) 6189_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6190 6191AC_LIBTOOL_CONFIG($1) 6192 6193AC_LANG_RESTORE 6194CC="$lt_save_CC" 6195])# AC_LIBTOOL_LANG_RC_CONFIG 6196 6197 6198# AC_LIBTOOL_CONFIG([TAGNAME]) 6199# ---------------------------- 6200# If TAGNAME is not passed, then create an initial libtool script 6201# with a default configuration from the untagged config vars. Otherwise 6202# add code to config.status for appending the configuration named by 6203# TAGNAME from the matching tagged config vars. 6204AC_DEFUN([AC_LIBTOOL_CONFIG], 6205[# The else clause should only fire when bootstrapping the 6206# libtool distribution, otherwise you forgot to ship ltmain.sh 6207# with your package, and you will get complaints that there are 6208# no rules to generate ltmain.sh. 6209if test -f "$ltmain"; then 6210 # See if we are running on zsh, and set the options which allow our commands through 6211 # without removal of \ escapes. 6212 if test -n "${ZSH_VERSION+set}" ; then 6213 setopt NO_GLOB_SUBST 6214 fi 6215 # Now quote all the things that may contain metacharacters while being 6216 # careful not to overquote the AC_SUBSTed values. We take copies of the 6217 # variables and quote the copies for generation of the libtool script. 6218 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 6219 SED SHELL STRIP \ 6220 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 6221 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 6222 deplibs_check_method reload_flag reload_cmds need_locks \ 6223 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 6224 lt_cv_sys_global_symbol_to_c_name_address \ 6225 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 6226 old_postinstall_cmds old_postuninstall_cmds \ 6227 _LT_AC_TAGVAR(compiler, $1) \ 6228 _LT_AC_TAGVAR(CC, $1) \ 6229 _LT_AC_TAGVAR(LD, $1) \ 6230 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 6231 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 6232 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 6233 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 6234 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 6235 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 6236 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 6237 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 6238 _LT_AC_TAGVAR(old_archive_cmds, $1) \ 6239 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 6240 _LT_AC_TAGVAR(predep_objects, $1) \ 6241 _LT_AC_TAGVAR(postdep_objects, $1) \ 6242 _LT_AC_TAGVAR(predeps, $1) \ 6243 _LT_AC_TAGVAR(postdeps, $1) \ 6244 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 6245 _LT_AC_TAGVAR(archive_cmds, $1) \ 6246 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 6247 _LT_AC_TAGVAR(postinstall_cmds, $1) \ 6248 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 6249 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 6250 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 6251 _LT_AC_TAGVAR(no_undefined_flag, $1) \ 6252 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 6253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 6254 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 6255 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 6256 _LT_AC_TAGVAR(hardcode_automatic, $1) \ 6257 _LT_AC_TAGVAR(module_cmds, $1) \ 6258 _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 6259 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 6260 _LT_AC_TAGVAR(exclude_expsyms, $1) \ 6261 _LT_AC_TAGVAR(include_expsyms, $1); do 6262 6263 case $var in 6264 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 6265 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 6266 _LT_AC_TAGVAR(archive_cmds, $1) | \ 6267 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 6268 _LT_AC_TAGVAR(module_cmds, $1) | \ 6269 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 6270 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 6271 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 6272 extract_expsyms_cmds | reload_cmds | finish_cmds | \ 6273 postinstall_cmds | postuninstall_cmds | \ 6274 old_postinstall_cmds | old_postuninstall_cmds | \ 6275 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 6276 # Double-quote double-evaled strings. 6277 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 6278 ;; 6279 *) 6280 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 6281 ;; 6282 esac 6283 done 6284 6285 case $lt_echo in 6286 *'\[$]0 --fallback-echo"') 6287 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 6288 ;; 6289 esac 6290 6291ifelse([$1], [], 6292 [cfgfile="${ofile}T" 6293 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 6294 $rm -f "$cfgfile" 6295 AC_MSG_NOTICE([creating $ofile])], 6296 [cfgfile="$ofile"]) 6297 6298 cat <<__EOF__ >> "$cfgfile" 6299ifelse([$1], [], 6300[#! $SHELL 6301 6302# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 6303# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 6304# NOTE: Changes made to this file will be lost: look at ltmain.sh. 6305# 6306# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 6307# Free Software Foundation, Inc. 6308# 6309# This file is part of GNU Libtool: 6310# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6311# 6312# This program is free software; you can redistribute it and/or modify 6313# it under the terms of the GNU General Public License as published by 6314# the Free Software Foundation; either version 2 of the License, or 6315# (at your option) any later version. 6316# 6317# This program is distributed in the hope that it will be useful, but 6318# WITHOUT ANY WARRANTY; without even the implied warranty of 6319# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6320# General Public License for more details. 6321# 6322# You should have received a copy of the GNU General Public License 6323# along with this program; if not, write to the Free Software 6324# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 6325# 6326# As a special exception to the GNU General Public License, if you 6327# distribute this file as part of a program that contains a 6328# configuration script generated by Autoconf, you may include it under 6329# the same distribution terms that you use for the rest of that program. 6330 6331# A sed program that does not truncate output. 6332SED=$lt_SED 6333 6334# Sed that helps us avoid accidentally triggering echo(1) options like -n. 6335Xsed="$SED -e 1s/^X//" 6336 6337# The HP-UX ksh and POSIX shell print the target directory to stdout 6338# if CDPATH is set. 6339(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 6340 6341# The names of the tagged configurations supported by this script. 6342available_tags= 6343 6344# ### BEGIN LIBTOOL CONFIG], 6345[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 6346 6347# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 6348 6349# Shell to use when invoking shell scripts. 6350SHELL=$lt_SHELL 6351 6352# Whether or not to build shared libraries. 6353build_libtool_libs=$enable_shared 6354 6355# Whether or not to build static libraries. 6356build_old_libs=$enable_static 6357 6358# Whether or not to add -lc for building shared libraries. 6359build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 6360 6361# Whether or not to disallow shared libs when runtime libs are static 6362allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 6363 6364# Whether or not to optimize for fast installation. 6365fast_install=$enable_fast_install 6366 6367# The host system. 6368host_alias=$host_alias 6369host=$host 6370host_os=$host_os 6371 6372# The build system. 6373build_alias=$build_alias 6374build=$build 6375build_os=$build_os 6376 6377# An echo program that does not interpret backslashes. 6378echo=$lt_echo 6379 6380# The archiver. 6381AR=$lt_AR 6382AR_FLAGS=$lt_AR_FLAGS 6383 6384# A C compiler. 6385LTCC=$lt_LTCC 6386 6387# LTCC compiler flags. 6388LTCFLAGS=$lt_LTCFLAGS 6389 6390# A language-specific compiler. 6391CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 6392 6393# Is the compiler the GNU C compiler? 6394with_gcc=$_LT_AC_TAGVAR(GCC, $1) 6395 6396# An ERE matcher. 6397EGREP=$lt_EGREP 6398 6399# The linker used to build libraries. 6400LD=$lt_[]_LT_AC_TAGVAR(LD, $1) 6401 6402# Whether we need hard or soft links. 6403LN_S=$lt_LN_S 6404 6405# A BSD-compatible nm program. 6406NM=$lt_NM 6407 6408# A symbol stripping program 6409STRIP=$lt_STRIP 6410 6411# Used to examine libraries when file_magic_cmd begins "file" 6412MAGIC_CMD=$MAGIC_CMD 6413 6414# Used on cygwin: DLL creation program. 6415DLLTOOL="$DLLTOOL" 6416 6417# Used on cygwin: object dumper. 6418OBJDUMP="$OBJDUMP" 6419 6420# Used on cygwin: assembler. 6421AS="$AS" 6422 6423# The name of the directory that contains temporary libtool files. 6424objdir=$objdir 6425 6426# How to create reloadable object files. 6427reload_flag=$lt_reload_flag 6428reload_cmds=$lt_reload_cmds 6429 6430# How to pass a linker flag through the compiler. 6431wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 6432 6433# Object file suffix (normally "o"). 6434objext="$ac_objext" 6435 6436# Old archive suffix (normally "a"). 6437libext="$libext" 6438 6439# Shared library suffix (normally ".so"). 6440shrext_cmds='$shrext_cmds' 6441 6442# Executable file suffix (normally ""). 6443exeext="$exeext" 6444 6445# Additional compiler flags for building library objects. 6446pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 6447pic_mode=$pic_mode 6448 6449# What is the maximum length of a command? 6450max_cmd_len=$lt_cv_sys_max_cmd_len 6451 6452# Does compiler simultaneously support -c and -o options? 6453compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 6454 6455# Must we lock files when doing compilation? 6456need_locks=$lt_need_locks 6457 6458# Do we need the lib prefix for modules? 6459need_lib_prefix=$need_lib_prefix 6460 6461# Do we need a version for libraries? 6462need_version=$need_version 6463 6464# Whether dlopen is supported. 6465dlopen_support=$enable_dlopen 6466 6467# Whether dlopen of programs is supported. 6468dlopen_self=$enable_dlopen_self 6469 6470# Whether dlopen of statically linked programs is supported. 6471dlopen_self_static=$enable_dlopen_self_static 6472 6473# Compiler flag to prevent dynamic linking. 6474link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 6475 6476# Compiler flag to turn off builtin functions. 6477no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 6478 6479# Compiler flag to allow reflexive dlopens. 6480export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 6481 6482# Compiler flag to generate shared objects directly from archives. 6483whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 6484 6485# Compiler flag to generate thread-safe objects. 6486thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 6487 6488# Library versioning type. 6489version_type=$version_type 6490 6491# Format of library name prefix. 6492libname_spec=$lt_libname_spec 6493 6494# List of archive names. First name is the real one, the rest are links. 6495# The last name is the one that the linker finds with -lNAME. 6496library_names_spec=$lt_library_names_spec 6497 6498# The coded name of the library, if different from the real name. 6499soname_spec=$lt_soname_spec 6500 6501# Commands used to build and install an old-style archive. 6502RANLIB=$lt_RANLIB 6503old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 6504old_postinstall_cmds=$lt_old_postinstall_cmds 6505old_postuninstall_cmds=$lt_old_postuninstall_cmds 6506 6507# Create an old-style archive from a shared archive. 6508old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 6509 6510# Create a temporary old-style archive to link instead of a shared archive. 6511old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 6512 6513# Commands used to build and install a shared archive. 6514archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 6515archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 6516postinstall_cmds=$lt_postinstall_cmds 6517postuninstall_cmds=$lt_postuninstall_cmds 6518 6519# Commands used to build a loadable module (assumed same as above if empty) 6520module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 6521module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 6522 6523# Commands to strip libraries. 6524old_striplib=$lt_old_striplib 6525striplib=$lt_striplib 6526 6527# Dependencies to place before the objects being linked to create a 6528# shared library. 6529predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 6530 6531# Dependencies to place after the objects being linked to create a 6532# shared library. 6533postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 6534 6535# Dependencies to place before the objects being linked to create a 6536# shared library. 6537predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 6538 6539# Dependencies to place after the objects being linked to create a 6540# shared library. 6541postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 6542 6543# The library search path used internally by the compiler when linking 6544# a shared library. 6545compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 6546 6547# Method to check whether dependent libraries are shared objects. 6548deplibs_check_method=$lt_deplibs_check_method 6549 6550# Command to use when deplibs_check_method == file_magic. 6551file_magic_cmd=$lt_file_magic_cmd 6552 6553# Flag that allows shared libraries with undefined symbols to be built. 6554allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 6555 6556# Flag that forces no undefined symbols. 6557no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 6558 6559# Commands used to finish a libtool library installation in a directory. 6560finish_cmds=$lt_finish_cmds 6561 6562# Same as above, but a single script fragment to be evaled but not shown. 6563finish_eval=$lt_finish_eval 6564 6565# Take the output of nm and produce a listing of raw symbols and C names. 6566global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 6567 6568# Transform the output of nm in a proper C declaration 6569global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 6570 6571# Transform the output of nm in a C name address pair 6572global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 6573 6574# This is the shared library runtime path variable. 6575runpath_var=$runpath_var 6576 6577# This is the shared library path variable. 6578shlibpath_var=$shlibpath_var 6579 6580# Is shlibpath searched before the hard-coded library search path? 6581shlibpath_overrides_runpath=$shlibpath_overrides_runpath 6582 6583# How to hardcode a shared library path into an executable. 6584hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 6585 6586# Whether we should hardcode library paths into libraries. 6587hardcode_into_libs=$hardcode_into_libs 6588 6589# Flag to hardcode \$libdir into a binary during linking. 6590# This must work even if \$libdir does not exist. 6591hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 6592 6593# If ld is used when linking, flag to hardcode \$libdir into 6594# a binary during linking. This must work even if \$libdir does 6595# not exist. 6596hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 6597 6598# Whether we need a single -rpath flag with a separated argument. 6599hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 6600 6601# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 6602# resulting binary. 6603hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 6604 6605# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 6606# resulting binary. 6607hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 6608 6609# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 6610# the resulting binary. 6611hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 6612 6613# Set to yes if building a shared library automatically hardcodes DIR into the library 6614# and all subsequent libraries and executables linked against it. 6615hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 6616 6617# Variables whose values should be saved in libtool wrapper scripts and 6618# restored at relink time. 6619variables_saved_for_relink="$variables_saved_for_relink" 6620 6621# Whether libtool must link a program against all its dependency libraries. 6622link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 6623 6624# Compile-time system search path for libraries 6625sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 6626 6627# Run-time system search path for libraries 6628sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 6629 6630# Fix the shell variable \$srcfile for the compiler. 6631fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 6632 6633# Set to yes if exported symbols are required. 6634always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 6635 6636# The commands to list exported symbols. 6637export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 6638 6639# The commands to extract the exported symbol list from a shared archive. 6640extract_expsyms_cmds=$lt_extract_expsyms_cmds 6641 6642# Symbols that should not be listed in the preloaded symbols. 6643exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 6644 6645# Symbols that must always be exported. 6646include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 6647 6648ifelse([$1],[], 6649[# ### END LIBTOOL CONFIG], 6650[# ### END LIBTOOL TAG CONFIG: $tagname]) 6651 6652__EOF__ 6653 6654ifelse([$1],[], [ 6655 case $host_os in 6656 aix3*) 6657 cat <<\EOF >> "$cfgfile" 6658 6659# AIX sometimes has problems with the GCC collect2 program. For some 6660# reason, if we set the COLLECT_NAMES environment variable, the problems 6661# vanish in a puff of smoke. 6662if test "X${COLLECT_NAMES+set}" != Xset; then 6663 COLLECT_NAMES= 6664 export COLLECT_NAMES 6665fi 6666EOF 6667 ;; 6668 esac 6669 6670 # We use sed instead of cat because bash on DJGPP gets confused if 6671 # if finds mixed CR/LF and LF-only lines. Since sed operates in 6672 # text mode, it properly converts lines to CR/LF. This bash problem 6673 # is reportedly fixed, but why not run on old versions too? 6674 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 6675 6676 mv -f "$cfgfile" "$ofile" || \ 6677 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 6678 chmod +x "$ofile" 6679]) 6680else 6681 # If there is no Makefile yet, we rely on a make rule to execute 6682 # `config.status --recheck' to rerun these tests and create the 6683 # libtool script then. 6684 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 6685 if test -f "$ltmain_in"; then 6686 test -f Makefile && make "$ltmain" 6687 fi 6688fi 6689])# AC_LIBTOOL_CONFIG 6690 6691 6692# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 6693# ------------------------------------------- 6694AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 6695[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 6696 6697_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6698 6699if test "$GCC" = yes; then 6700 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6701 6702 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 6703 lt_cv_prog_compiler_rtti_exceptions, 6704 [-fno-rtti -fno-exceptions], [], 6705 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6706fi 6707])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 6708 6709 6710# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6711# --------------------------------- 6712AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 6713[AC_REQUIRE([AC_CANONICAL_HOST]) 6714AC_REQUIRE([AC_PROG_NM]) 6715AC_REQUIRE([AC_OBJEXT]) 6716# Check for command to grab the raw symbol name followed by C symbol from nm. 6717AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 6718AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 6719[ 6720# These are sane defaults that work on at least a few old systems. 6721# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6722 6723# Character class describing NM global symbol codes. 6724symcode='[[BCDEGRST]]' 6725 6726# Regexp to match symbols that can be accessed directly from C. 6727sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6728 6729# Transform an extracted symbol line into a proper C declaration 6730lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 6731 6732# Transform an extracted symbol line into symbol name and symbol address 6733lt_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'" 6734 6735# Define system-specific variables. 6736case $host_os in 6737aix*) 6738 symcode='[[BCDT]]' 6739 ;; 6740cygwin* | mingw* | pw32*) 6741 symcode='[[ABCDGISTW]]' 6742 ;; 6743hpux*) # Its linker distinguishes data from code symbols 6744 if test "$host_cpu" = ia64; then 6745 symcode='[[ABCDEGRST]]' 6746 fi 6747 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6748 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'" 6749 ;; 6750linux*) 6751 if test "$host_cpu" = ia64; then 6752 symcode='[[ABCDGIRSTW]]' 6753 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6754 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'" 6755 fi 6756 ;; 6757irix* | nonstopux*) 6758 symcode='[[BCDEGRST]]' 6759 ;; 6760osf*) 6761 symcode='[[BCDEGQRST]]' 6762 ;; 6763solaris*) 6764 symcode='[[BDRT]]' 6765 ;; 6766sco3.2v5*) 6767 symcode='[[DT]]' 6768 ;; 6769sysv4.2uw2*) 6770 symcode='[[DT]]' 6771 ;; 6772sysv5* | sco5v6* | unixware* | OpenUNIX*) 6773 symcode='[[ABDT]]' 6774 ;; 6775sysv4) 6776 symcode='[[DFNSTU]]' 6777 ;; 6778esac 6779 6780# Handle CRLF in mingw tool chain 6781opt_cr= 6782case $build_os in 6783mingw*) 6784 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6785 ;; 6786esac 6787 6788# If we're using GNU nm, then use its standard symbol codes. 6789case `$NM -V 2>&1` in 6790*GNU* | *'with BFD'*) 6791 symcode='[[ABCDGIRSTW]]' ;; 6792esac 6793 6794# Try without a prefix undercore, then with it. 6795for ac_symprfx in "" "_"; do 6796 6797 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6798 symxfrm="\\1 $ac_symprfx\\2 \\2" 6799 6800 # Write the raw and C identifiers. 6801 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6802 6803 # Check to see that the pipe works correctly. 6804 pipe_works=no 6805 6806 rm -f conftest* 6807 cat > conftest.$ac_ext <<EOF 6808#ifdef __cplusplus 6809extern "C" { 6810#endif 6811char nm_test_var; 6812void nm_test_func(){} 6813#ifdef __cplusplus 6814} 6815#endif 6816int main(){nm_test_var='a';nm_test_func();return(0);} 6817EOF 6818 6819 if AC_TRY_EVAL(ac_compile); then 6820 # Now try to grab the symbols. 6821 nlist=conftest.nm 6822 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 6823 # Try sorting and uniquifying the output. 6824 if sort "$nlist" | uniq > "$nlist"T; then 6825 mv -f "$nlist"T "$nlist" 6826 else 6827 rm -f "$nlist"T 6828 fi 6829 6830 # Make sure that we snagged all the symbols we need. 6831 if grep ' nm_test_var$' "$nlist" >/dev/null; then 6832 if grep ' nm_test_func$' "$nlist" >/dev/null; then 6833 cat <<EOF > conftest.$ac_ext 6834#ifdef __cplusplus 6835extern "C" { 6836#endif 6837 6838EOF 6839 # Now generate the symbol file. 6840 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 6841 6842 cat <<EOF >> conftest.$ac_ext 6843#if defined (__STDC__) && __STDC__ 6844# define lt_ptr_t void * 6845#else 6846# define lt_ptr_t char * 6847# define const 6848#endif 6849 6850/* The mapping between symbol names and symbols. */ 6851const struct { 6852 const char *name; 6853 lt_ptr_t address; 6854} 6855lt_preloaded_symbols[[]] = 6856{ 6857EOF 6858 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 6859 cat <<\EOF >> conftest.$ac_ext 6860 {0, (lt_ptr_t) 0} 6861}; 6862 6863#ifdef __cplusplus 6864} 6865#endif 6866EOF 6867 # Now try linking the two files. 6868 mv conftest.$ac_objext conftstm.$ac_objext 6869 lt_save_LIBS="$LIBS" 6870 lt_save_CFLAGS="$CFLAGS" 6871 LIBS="conftstm.$ac_objext" 6872 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6873 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6874 pipe_works=yes 6875 fi 6876 LIBS="$lt_save_LIBS" 6877 CFLAGS="$lt_save_CFLAGS" 6878 else 6879 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6880 fi 6881 else 6882 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6883 fi 6884 else 6885 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6886 fi 6887 else 6888 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6889 cat conftest.$ac_ext >&5 6890 fi 6891 rm -f conftest* conftst* 6892 6893 # Do not use the global_symbol_pipe unless it works. 6894 if test "$pipe_works" = yes; then 6895 break 6896 else 6897 lt_cv_sys_global_symbol_pipe= 6898 fi 6899done 6900]) 6901if test -z "$lt_cv_sys_global_symbol_pipe"; then 6902 lt_cv_sys_global_symbol_to_cdecl= 6903fi 6904if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6905 AC_MSG_RESULT(failed) 6906else 6907 AC_MSG_RESULT(ok) 6908fi 6909]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 6910 6911 6912# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 6913# --------------------------------------- 6914AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 6915[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 6916_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6917_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 6918 6919AC_MSG_CHECKING([for $compiler option to produce PIC]) 6920 ifelse([$1],[CXX],[ 6921 # C++ specific cases for pic, static, wl, etc. 6922 if test "$GXX" = yes; then 6923 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6924 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 6925 6926 case $host_os in 6927 aix*) 6928 # All AIX code is PIC. 6929 if test "$host_cpu" = ia64; then 6930 # AIX 5 now supports IA64 processor 6931 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6932 fi 6933 ;; 6934 amigaos*) 6935 # FIXME: we need at least 68020 code to build shared libraries, but 6936 # adding the `-m68020' flag to GCC prevents building anything better, 6937 # like `-m68040'. 6938 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6939 ;; 6940 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6941 # PIC is the default for these OSes. 6942 ;; 6943 mingw* | os2* | pw32*) 6944 # This hack is so that the source file can tell whether it is being 6945 # built for inclusion in a dll (and should export symbols for example). 6946 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 6947 ;; 6948 darwin* | rhapsody*) 6949 # PIC is the default on this platform 6950 # Common symbols not allowed in MH_DYLIB files 6951 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6952 ;; 6953 *djgpp*) 6954 # DJGPP does not support shared libraries at all 6955 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 6956 ;; 6957 interix3*) 6958 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6959 # Instead, we relocate shared libraries at runtime. 6960 ;; 6961 sysv4*MP*) 6962 if test -d /usr/nec; then 6963 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6964 fi 6965 ;; 6966 hpux*) 6967 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6968 # not for PA HP-UX. 6969 case $host_cpu in 6970 hppa*64*|ia64*) 6971 ;; 6972 *) 6973 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6974 ;; 6975 esac 6976 ;; 6977 *) 6978 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6979 ;; 6980 esac 6981 else 6982 case $host_os in 6983 aix4* | aix5*) 6984 # All AIX code is PIC. 6985 if test "$host_cpu" = ia64; then 6986 # AIX 5 now supports IA64 processor 6987 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6988 else 6989 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6990 fi 6991 ;; 6992 chorus*) 6993 case $cc_basename in 6994 cxch68*) 6995 # Green Hills C++ Compiler 6996 # _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" 6997 ;; 6998 esac 6999 ;; 7000 darwin*) 7001 # PIC is the default on this platform 7002 # Common symbols not allowed in MH_DYLIB files 7003 case $cc_basename in 7004 xlc*) 7005 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 7006 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7007 ;; 7008 esac 7009 ;; 7010 dgux*) 7011 case $cc_basename in 7012 ec++*) 7013 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7014 ;; 7015 ghcx*) 7016 # Green Hills C++ Compiler 7017 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7018 ;; 7019 *) 7020 ;; 7021 esac 7022 ;; 7023 freebsd* | kfreebsd*-gnu | dragonfly*) 7024 # FreeBSD uses GNU C++ 7025 ;; 7026 hpux9* | hpux10* | hpux11*) 7027 case $cc_basename in 7028 CC*) 7029 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7030 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7031 if test "$host_cpu" != ia64; then 7032 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7033 fi 7034 ;; 7035 aCC*) 7036 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7037 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7038 case $host_cpu in 7039 hppa*64*|ia64*) 7040 # +Z the default 7041 ;; 7042 *) 7043 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7044 ;; 7045 esac 7046 ;; 7047 *) 7048 ;; 7049 esac 7050 ;; 7051 interix*) 7052 # This is c89, which is MS Visual C++ (no shared libs) 7053 # Anyone wants to do a port? 7054 ;; 7055 irix5* | irix6* | nonstopux*) 7056 case $cc_basename in 7057 CC*) 7058 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7059 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7060 # CC pic flag -KPIC is the default. 7061 ;; 7062 *) 7063 ;; 7064 esac 7065 ;; 7066 linux*) 7067 case $cc_basename in 7068 KCC*) 7069 # KAI C++ Compiler 7070 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7071 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7072 ;; 7073 icpc* | ecpc*) 7074 # Intel C++ 7075 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7077 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7078 ;; 7079 pgCC*) 7080 # Portland Group C++ compiler. 7081 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7082 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7083 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7084 ;; 7085 cxx*) 7086 # Compaq C++ 7087 # Make sure the PIC flag is empty. It appears that all Alpha 7088 # Linux and Compaq Tru64 Unix objects are PIC. 7089 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7090 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7091 ;; 7092 *) 7093 ;; 7094 esac 7095 ;; 7096 lynxos*) 7097 ;; 7098 m88k*) 7099 ;; 7100 mvs*) 7101 case $cc_basename in 7102 cxx*) 7103 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 7104 ;; 7105 *) 7106 ;; 7107 esac 7108 ;; 7109 netbsd*) 7110 ;; 7111 osf3* | osf4* | osf5*) 7112 case $cc_basename in 7113 KCC*) 7114 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 7115 ;; 7116 RCC*) 7117 # Rational C++ 2.4.1 7118 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7119 ;; 7120 cxx*) 7121 # Digital/Compaq C++ 7122 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7123 # Make sure the PIC flag is empty. It appears that all Alpha 7124 # Linux and Compaq Tru64 Unix objects are PIC. 7125 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7126 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7127 ;; 7128 *) 7129 ;; 7130 esac 7131 ;; 7132 psos*) 7133 ;; 7134 solaris*) 7135 case $cc_basename in 7136 CC*) 7137 # Sun C++ 4.2, 5.x and Centerline C++ 7138 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7139 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7140 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7141 ;; 7142 gcx*) 7143 # Green Hills C++ Compiler 7144 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7145 ;; 7146 *) 7147 ;; 7148 esac 7149 ;; 7150 sunos4*) 7151 case $cc_basename in 7152 CC*) 7153 # Sun C++ 4.x 7154 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7155 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7156 ;; 7157 lcc*) 7158 # Lucid 7159 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7160 ;; 7161 *) 7162 ;; 7163 esac 7164 ;; 7165 tandem*) 7166 case $cc_basename in 7167 NCC*) 7168 # NonStop-UX NCC 3.20 7169 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7170 ;; 7171 *) 7172 ;; 7173 esac 7174 ;; 7175 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7176 case $cc_basename in 7177 CC*) 7178 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7179 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7180 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7181 ;; 7182 esac 7183 ;; 7184 vxworks*) 7185 ;; 7186 *) 7187 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7188 ;; 7189 esac 7190 fi 7191], 7192[ 7193 if test "$GCC" = yes; then 7194 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7195 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7196 7197 case $host_os in 7198 aix*) 7199 # All AIX code is PIC. 7200 if test "$host_cpu" = ia64; then 7201 # AIX 5 now supports IA64 processor 7202 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7203 fi 7204 ;; 7205 7206 amigaos*) 7207 # FIXME: we need at least 68020 code to build shared libraries, but 7208 # adding the `-m68020' flag to GCC prevents building anything better, 7209 # like `-m68040'. 7210 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 7211 ;; 7212 7213 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 7214 # PIC is the default for these OSes. 7215 ;; 7216 7217 mingw* | pw32* | os2*) 7218 # This hack is so that the source file can tell whether it is being 7219 # built for inclusion in a dll (and should export symbols for example). 7220 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 7221 ;; 7222 7223 darwin* | rhapsody*) 7224 # PIC is the default on this platform 7225 # Common symbols not allowed in MH_DYLIB files 7226 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 7227 ;; 7228 7229 interix3*) 7230 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 7231 # Instead, we relocate shared libraries at runtime. 7232 ;; 7233 7234 msdosdjgpp*) 7235 # Just because we use GCC doesn't mean we suddenly get shared libraries 7236 # on systems that don't support them. 7237 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7238 enable_shared=no 7239 ;; 7240 7241 sysv4*MP*) 7242 if test -d /usr/nec; then 7243 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 7244 fi 7245 ;; 7246 7247 hpux*) 7248 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 7249 # not for PA HP-UX. 7250 case $host_cpu in 7251 hppa*64*|ia64*) 7252 # +Z the default 7253 ;; 7254 *) 7255 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7256 ;; 7257 esac 7258 ;; 7259 7260 *) 7261 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 7262 ;; 7263 esac 7264 else 7265 # PORTME Check for flag to pass linker flags through the system compiler. 7266 case $host_os in 7267 aix*) 7268 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7269 if test "$host_cpu" = ia64; then 7270 # AIX 5 now supports IA64 processor 7271 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7272 else 7273 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 7274 fi 7275 ;; 7276 darwin*) 7277 # PIC is the default on this platform 7278 # Common symbols not allowed in MH_DYLIB files 7279 case $cc_basename in 7280 xlc*) 7281 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 7282 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7283 ;; 7284 esac 7285 ;; 7286 7287 mingw* | pw32* | os2*) 7288 # This hack is so that the source file can tell whether it is being 7289 # built for inclusion in a dll (and should export symbols for example). 7290 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 7291 ;; 7292 7293 hpux9* | hpux10* | hpux11*) 7294 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7295 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 7296 # not for PA HP-UX. 7297 case $host_cpu in 7298 hppa*64*|ia64*) 7299 # +Z the default 7300 ;; 7301 *) 7302 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 7303 ;; 7304 esac 7305 # Is there a better lt_prog_compiler_static that works with the bundled CC? 7306 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 7307 ;; 7308 7309 irix5* | irix6* | nonstopux*) 7310 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7311 # PIC (with -KPIC) is the default. 7312 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7313 ;; 7314 7315 newsos6) 7316 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7317 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7318 ;; 7319 7320 linux*) 7321 case $cc_basename in 7322 icc* | ecc*) 7323 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7324 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7325 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 7326 ;; 7327 pgcc* | pgf77* | pgf90* | pgf95*) 7328 # Portland Group compilers (*not* the Pentium gcc compiler, 7329 # which looks to be a dead project) 7330 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7331 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 7332 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7333 ;; 7334 ccc*) 7335 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7336 # All Alpha code is PIC. 7337 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7338 ;; 7339 esac 7340 ;; 7341 7342 osf3* | osf4* | osf5*) 7343 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7344 # All OSF/1 code is PIC. 7345 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 7346 ;; 7347 7348 solaris*) 7349 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7350 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7351 case $cc_basename in 7352 f77* | f90* | f95*) 7353 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 7354 *) 7355 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 7356 esac 7357 ;; 7358 7359 sunos4*) 7360 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7361 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7362 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7363 ;; 7364 7365 sysv4 | sysv4.2uw2* | sysv4.3*) 7366 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7367 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7368 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7369 ;; 7370 7371 sysv4*MP*) 7372 if test -d /usr/nec ;then 7373 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 7374 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7375 fi 7376 ;; 7377 7378 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7379 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7380 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7381 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7382 ;; 7383 7384 unicos*) 7385 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7386 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7387 ;; 7388 7389 uts4*) 7390 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7391 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7392 ;; 7393 7394 *) 7395 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7396 ;; 7397 esac 7398 fi 7399]) 7400AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 7401 7402# 7403# Check to make sure the PIC flag actually works. 7404# 7405if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 7406 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 7407 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 7408 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 7409 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 7410 "" | " "*) ;; 7411 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 7412 esac], 7413 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7414 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 7415fi 7416case $host_os in 7417 # For platforms which do not support PIC, -DPIC is meaningless: 7418 *djgpp*) 7419 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 7420 ;; 7421 *) 7422 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 7423 ;; 7424esac 7425 7426# 7427# Check to make sure the static flag actually works. 7428# 7429wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 7430AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 7431 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 7432 $lt_tmp_static_flag, 7433 [], 7434 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 7435]) 7436 7437 7438# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 7439# ------------------------------------ 7440# See if the linker supports building shared libraries. 7441AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 7442[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7443ifelse([$1],[CXX],[ 7444 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7445 case $host_os in 7446 aix4* | aix5*) 7447 # If we're using GNU nm, then we don't want the "-C" option. 7448 # -C means demangle to AIX nm, but means don't demangle with GNU nm 7449 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7450 _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' 7451 else 7452 _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' 7453 fi 7454 ;; 7455 pw32*) 7456 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 7457 ;; 7458 cygwin* | mingw*) 7459 _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' 7460 ;; 7461 *) 7462 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7463 ;; 7464 esac 7465],[ 7466 runpath_var= 7467 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 7468 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7469 _LT_AC_TAGVAR(archive_cmds, $1)= 7470 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 7471 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 7472 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 7473 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7474 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7475 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 7476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7477 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7478 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7479 _LT_AC_TAGVAR(hardcode_direct, $1)=no 7480 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 7481 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7482 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 7483 _LT_AC_TAGVAR(hardcode_automatic, $1)=no 7484 _LT_AC_TAGVAR(module_cmds, $1)= 7485 _LT_AC_TAGVAR(module_expsym_cmds, $1)= 7486 _LT_AC_TAGVAR(always_export_symbols, $1)=no 7487 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7488 # include_expsyms should be a list of space-separated symbols to be *always* 7489 # included in the symbol list 7490 _LT_AC_TAGVAR(include_expsyms, $1)= 7491 # exclude_expsyms can be an extended regexp of symbols to exclude 7492 # it will be wrapped by ` (' and `)$', so one must not match beginning or 7493 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 7494 # as well as any symbol that contains `d'. 7495 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 7496 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 7497 # platforms (ab)use it in PIC code, but their linkers get confused if 7498 # the symbol is explicitly referenced. Since portable code cannot 7499 # rely on this symbol name, it's probably fine to never include it in 7500 # preloaded symbol tables. 7501 extract_expsyms_cmds= 7502 # Just being paranoid about ensuring that cc_basename is set. 7503 _LT_CC_BASENAME([$compiler]) 7504 case $host_os in 7505 cygwin* | mingw* | pw32*) 7506 # FIXME: the MSVC++ port hasn't been tested in a loooong time 7507 # When not using gcc, we currently assume that we are using 7508 # Microsoft Visual C++. 7509 if test "$GCC" != yes; then 7510 with_gnu_ld=no 7511 fi 7512 ;; 7513 interix*) 7514 # we just hope/assume this is gcc and not c89 (= MSVC++) 7515 with_gnu_ld=yes 7516 ;; 7517 openbsd*) 7518 with_gnu_ld=no 7519 ;; 7520 esac 7521 7522 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 7523 if test "$with_gnu_ld" = yes; then 7524 # If archive_cmds runs LD, not CC, wlarc should be empty 7525 wlarc='${wl}' 7526 7527 # Set some defaults for GNU ld with shared library support. These 7528 # are reset later if shared libraries are not supported. Putting them 7529 # here allows them to be overridden if necessary. 7530 runpath_var=LD_RUN_PATH 7531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7532 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7533 # ancient GNU ld didn't support --whole-archive et. al. 7534 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 7535 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7536 else 7537 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7538 fi 7539 supports_anon_versioning=no 7540 case `$LD -v 2>/dev/null` in 7541 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 7542 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 7543 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 7544 *\ 2.11.*) ;; # other 2.11 versions 7545 *) supports_anon_versioning=yes ;; 7546 esac 7547 7548 # See if GNU ld supports shared libraries. 7549 case $host_os in 7550 aix3* | aix4* | aix5*) 7551 # On AIX/PPC, the GNU linker is very broken 7552 if test "$host_cpu" != ia64; then 7553 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7554 cat <<EOF 1>&2 7555 7556*** Warning: the GNU linker, at least up to release 2.9.1, is reported 7557*** to be unable to reliably create shared libraries on AIX. 7558*** Therefore, libtool is disabling shared libraries support. If you 7559*** really care for shared libraries, you may want to modify your PATH 7560*** so that a non-GNU linker is found, and then restart. 7561 7562EOF 7563 fi 7564 ;; 7565 7566 amigaos*) 7567 _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)' 7568 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7569 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7570 7571 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 7572 # that the semantics of dynamic libraries on AmigaOS, at least up 7573 # to version 4, is to share data among multiple programs linked 7574 # with the same dynamic library. Since this doesn't match the 7575 # behavior of shared libraries on other platforms, we can't use 7576 # them. 7577 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7578 ;; 7579 7580 beos*) 7581 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7582 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7583 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7584 # support --undefined. This deserves some investigation. FIXME 7585 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7586 else 7587 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7588 fi 7589 ;; 7590 7591 cygwin* | mingw* | pw32*) 7592 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7593 # as there is no search path for DLLs. 7594 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7595 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7596 _LT_AC_TAGVAR(always_export_symbols, $1)=no 7597 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7598 _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' 7599 7600 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 7601 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7602 # If the export-symbols file already is a .def file (1st line 7603 # is EXPORTS), use it as is; otherwise, prepend... 7604 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7605 cp $export_symbols $output_objdir/$soname.def; 7606 else 7607 echo EXPORTS > $output_objdir/$soname.def; 7608 cat $export_symbols >> $output_objdir/$soname.def; 7609 fi~ 7610 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7611 else 7612 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7613 fi 7614 ;; 7615 7616 interix3*) 7617 _LT_AC_TAGVAR(hardcode_direct, $1)=no 7618 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7619 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7620 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7621 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7622 # Instead, shared libraries are loaded at an image base (0x10000000 by 7623 # default) and relocated if they conflict, which is a slow very memory 7624 # consuming and fragmenting process. To avoid this, we pick a random, 7625 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7626 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7627 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7628 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7629 ;; 7630 7631 linux*) 7632 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7633 tmp_addflag= 7634 case $cc_basename,$host_cpu in 7635 pgcc*) # Portland Group C compiler 7636 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 7637 tmp_addflag=' $pic_flag' 7638 ;; 7639 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 7640 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 7641 tmp_addflag=' $pic_flag -Mnomain' ;; 7642 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 7643 tmp_addflag=' -i_dynamic' ;; 7644 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 7645 tmp_addflag=' -i_dynamic -nofor_main' ;; 7646 ifc* | ifort*) # Intel Fortran compiler 7647 tmp_addflag=' -nofor_main' ;; 7648 esac 7649 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7650 7651 if test $supports_anon_versioning = yes; then 7652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 7653 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7654 $echo "local: *; };" >> $output_objdir/$libname.ver~ 7655 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7656 fi 7657 else 7658 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7659 fi 7660 ;; 7661 7662 netbsd*) 7663 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 7664 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7665 wlarc= 7666 else 7667 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7668 _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' 7669 fi 7670 ;; 7671 7672 solaris*) 7673 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 7674 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7675 cat <<EOF 1>&2 7676 7677*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7678*** create shared libraries on Solaris systems. Therefore, libtool 7679*** is disabling shared libraries support. We urge you to upgrade GNU 7680*** binutils to release 2.9.1 or newer. Another option is to modify 7681*** your PATH or compiler configuration so that the native linker is 7682*** used, and then restart. 7683 7684EOF 7685 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7686 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7687 _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' 7688 else 7689 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7690 fi 7691 ;; 7692 7693 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7694 case `$LD -v 2>&1` in 7695 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7696 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7697 cat <<_LT_EOF 1>&2 7698 7699*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7700*** reliably create shared libraries on SCO systems. Therefore, libtool 7701*** is disabling shared libraries support. We urge you to upgrade GNU 7702*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7703*** your PATH or compiler configuration so that the native linker is 7704*** used, and then restart. 7705 7706_LT_EOF 7707 ;; 7708 *) 7709 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7710 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 7711 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 7712 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 7713 else 7714 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7715 fi 7716 ;; 7717 esac 7718 ;; 7719 7720 sunos4*) 7721 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7722 wlarc= 7723 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7724 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7725 ;; 7726 7727 *) 7728 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 7729 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7730 _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' 7731 else 7732 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7733 fi 7734 ;; 7735 esac 7736 7737 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 7738 runpath_var= 7739 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7740 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7741 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7742 fi 7743 else 7744 # PORTME fill in a description of your system's linker (not GNU ld) 7745 case $host_os in 7746 aix3*) 7747 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7748 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7749 _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' 7750 # Note: this linker hardcodes the directories in LIBPATH if there 7751 # are no directories specified by -L. 7752 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7753 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7754 # Neither direct hardcoding nor static linking is supported with a 7755 # broken collect2. 7756 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7757 fi 7758 ;; 7759 7760 aix4* | aix5*) 7761 if test "$host_cpu" = ia64; then 7762 # On IA64, the linker does run time linking by default, so we don't 7763 # have to do anything special. 7764 aix_use_runtimelinking=no 7765 exp_sym_flag='-Bexport' 7766 no_entry_flag="" 7767 else 7768 # If we're using GNU nm, then we don't want the "-C" option. 7769 # -C means demangle to AIX nm, but means don't demangle with GNU nm 7770 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 7771 _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' 7772 else 7773 _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' 7774 fi 7775 aix_use_runtimelinking=no 7776 7777 # Test if we are trying to use run time linking or normal 7778 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7779 # need to do runtime linking. 7780 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) 7781 for ld_flag in $LDFLAGS; do 7782 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7783 aix_use_runtimelinking=yes 7784 break 7785 fi 7786 done 7787 ;; 7788 esac 7789 7790 exp_sym_flag='-bexport' 7791 no_entry_flag='-bnoentry' 7792 fi 7793 7794 # When large executables or shared objects are built, AIX ld can 7795 # have problems creating the table of contents. If linking a library 7796 # or program results in "error TOC overflow" add -mminimal-toc to 7797 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7798 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7799 7800 _LT_AC_TAGVAR(archive_cmds, $1)='' 7801 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7802 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 7803 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7804 7805 if test "$GCC" = yes; then 7806 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7807 # We only want to do this on AIX 4.2 and lower, the check 7808 # below for broken collect2 doesn't work under 4.3+ 7809 collect2name=`${CC} -print-prog-name=collect2` 7810 if test -f "$collect2name" && \ 7811 strings "$collect2name" | grep resolve_lib_name >/dev/null 7812 then 7813 # We have reworked collect2 7814 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7815 else 7816 # We have old collect2 7817 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 7818 # It fails to find uninstalled libraries when the uninstalled 7819 # path is not listed in the libpath. Setting hardcode_minus_L 7820 # to unsupported forces relinking 7821 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7822 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7823 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7824 fi 7825 ;; 7826 esac 7827 shared_flag='-shared' 7828 if test "$aix_use_runtimelinking" = yes; then 7829 shared_flag="$shared_flag "'${wl}-G' 7830 fi 7831 else 7832 # not using gcc 7833 if test "$host_cpu" = ia64; then 7834 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7835 # chokes on -Wl,-G. The following line is correct: 7836 shared_flag='-G' 7837 else 7838 if test "$aix_use_runtimelinking" = yes; then 7839 shared_flag='${wl}-G' 7840 else 7841 shared_flag='${wl}-bM:SRE' 7842 fi 7843 fi 7844 fi 7845 7846 # It seems that -bexpall does not export symbols beginning with 7847 # underscore (_), so it is better to generate a list of symbols to export. 7848 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 7849 if test "$aix_use_runtimelinking" = yes; then 7850 # Warning - without using the other runtime loading flags (-brtl), 7851 # -berok will link without error, but may produce a broken library. 7852 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 7853 # Determine the default libpath from the value encoded in an empty executable. 7854 _LT_AC_SYS_LIBPATH_AIX 7855 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7856 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7857 else 7858 if test "$host_cpu" = ia64; then 7859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7860 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7861 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 7862 else 7863 # Determine the default libpath from the value encoded in an empty executable. 7864 _LT_AC_SYS_LIBPATH_AIX 7865 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7866 # Warning - without using the other run time loading flags, 7867 # -berok will link without error, but may produce a broken library. 7868 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7869 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7870 # Exported symbols can be pulled into shared objects from archives 7871 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7872 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 7873 # This is similar to how AIX traditionally builds its shared libraries. 7874 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 7875 fi 7876 fi 7877 ;; 7878 7879 amigaos*) 7880 _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)' 7881 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7882 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7883 # see comment about different semantics on the GNU ld section 7884 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7885 ;; 7886 7887 bsdi[[45]]*) 7888 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7889 ;; 7890 7891 cygwin* | mingw* | pw32*) 7892 # When not using gcc, we currently assume that we are using 7893 # Microsoft Visual C++. 7894 # hardcode_libdir_flag_spec is actually meaningless, as there is 7895 # no search path for DLLs. 7896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7897 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 7898 # Tell ltmain to make .lib files, not .a files. 7899 libext=lib 7900 # Tell ltmain to make .dll files, not .so files. 7901 shrext_cmds=".dll" 7902 # FIXME: Setting linknames here is a bad hack. 7903 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 7904 # The linker will automatically build a .lib file if we build a DLL. 7905 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 7906 # FIXME: Should let the user specify the lib program. 7907 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 7908 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7909 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7910 ;; 7911 7912 darwin* | rhapsody*) 7913 case $host_os in 7914 rhapsody* | darwin1.[[012]]) 7915 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 7916 ;; 7917 *) # Darwin 1.3 on 7918 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 7919 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7920 else 7921 case ${MACOSX_DEPLOYMENT_TARGET} in 7922 10.[[012]]) 7923 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 7924 ;; 7925 10.*) 7926 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 7927 ;; 7928 esac 7929 fi 7930 ;; 7931 esac 7932 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7933 _LT_AC_TAGVAR(hardcode_direct, $1)=no 7934 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 7935 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7936 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 7937 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 7938 if test "$GCC" = yes ; then 7939 output_verbose_link_cmd='echo' 7940 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' 7941 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7942 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7943 _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}' 7944 _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}' 7945 else 7946 case $cc_basename in 7947 xlc*) 7948 output_verbose_link_cmd='echo' 7949 _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' 7950 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 7951 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 7952 _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}' 7953 _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}' 7954 ;; 7955 *) 7956 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7957 ;; 7958 esac 7959 fi 7960 ;; 7961 7962 dgux*) 7963 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7964 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7965 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7966 ;; 7967 7968 freebsd1*) 7969 _LT_AC_TAGVAR(ld_shlibs, $1)=no 7970 ;; 7971 7972 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7973 # support. Future versions do this automatically, but an explicit c++rt0.o 7974 # does not break anything, and helps significantly (at the cost of a little 7975 # extra space). 7976 freebsd2.2*) 7977 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7978 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7979 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7980 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7981 ;; 7982 7983 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7984 freebsd2*) 7985 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7986 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7987 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 7988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7989 ;; 7990 7991 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7992 freebsd* | kfreebsd*-gnu | dragonfly*) 7993 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7994 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7995 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 7996 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 7997 ;; 7998 7999 hpux9*) 8000 if test "$GCC" = yes; then 8001 _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' 8002 else 8003 _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' 8004 fi 8005 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8006 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8007 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8008 8009 # hardcode_minus_L: Not really in the search PATH, 8010 # but as the default location of the library. 8011 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8012 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8013 ;; 8014 8015 hpux10*) 8016 if test "$GCC" = yes -a "$with_gnu_ld" = no; then 8017 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8018 else 8019 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 8020 fi 8021 if test "$with_gnu_ld" = no; then 8022 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8023 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8024 8025 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8026 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8027 8028 # hardcode_minus_L: Not really in the search PATH, 8029 # but as the default location of the library. 8030 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8031 fi 8032 ;; 8033 8034 hpux11*) 8035 if test "$GCC" = yes -a "$with_gnu_ld" = no; then 8036 case $host_cpu in 8037 hppa*64*) 8038 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8039 ;; 8040 ia64*) 8041 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 8042 ;; 8043 *) 8044 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8045 ;; 8046 esac 8047 else 8048 case $host_cpu in 8049 hppa*64*) 8050 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8051 ;; 8052 ia64*) 8053 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 8054 ;; 8055 *) 8056 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 8057 ;; 8058 esac 8059 fi 8060 if test "$with_gnu_ld" = no; then 8061 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8062 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8063 8064 case $host_cpu in 8065 hppa*64*|ia64*) 8066 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 8067 _LT_AC_TAGVAR(hardcode_direct, $1)=no 8068 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8069 ;; 8070 *) 8071 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8072 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8073 8074 # hardcode_minus_L: Not really in the search PATH, 8075 # but as the default location of the library. 8076 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8077 ;; 8078 esac 8079 fi 8080 ;; 8081 8082 irix5* | irix6* | nonstopux*) 8083 if test "$GCC" = yes; then 8084 _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' 8085 else 8086 _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' 8087 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 8088 fi 8089 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8090 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8091 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8092 ;; 8093 8094 netbsd*) 8095 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 8096 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 8097 else 8098 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 8099 fi 8100 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8101 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8102 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8103 ;; 8104 8105 newsos6) 8106 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8107 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8108 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8109 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8110 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8111 ;; 8112 8113 openbsd*) 8114 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8115 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8116 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8117 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8118 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 8119 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8120 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8121 else 8122 case $host_os in 8123 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 8124 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 8125 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8126 ;; 8127 *) 8128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 8129 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8130 ;; 8131 esac 8132 fi 8133 ;; 8134 8135 os2*) 8136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8137 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8138 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 8139 _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' 8140 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 8141 ;; 8142 8143 osf3*) 8144 if test "$GCC" = yes; then 8145 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8146 _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' 8147 else 8148 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8149 _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' 8150 fi 8151 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8152 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8153 ;; 8154 8155 osf4* | osf5*) # as osf3* with the addition of -msym flag 8156 if test "$GCC" = yes; then 8157 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8158 _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' 8159 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8160 else 8161 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8162 _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' 8163 _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~ 8164 $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' 8165 8166 # Both c and cxx compiler support -rpath directly 8167 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8168 fi 8169 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8170 ;; 8171 8172 solaris*) 8173 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 8174 if test "$GCC" = yes; then 8175 wlarc='${wl}' 8176 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 8177 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8178 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 8179 else 8180 wlarc='' 8181 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 8182 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8183 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 8184 fi 8185 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8186 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8187 case $host_os in 8188 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8189 *) 8190 # The compiler driver will combine linker options so we 8191 # cannot just pass the convience library names through 8192 # without $wl, iff we do not link with $LD. 8193 # Luckily, gcc supports the same syntax we need for Sun Studio. 8194 # Supported since Solaris 2.6 (maybe 2.5.1?) 8195 case $wlarc in 8196 '') 8197 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 8198 *) 8199 _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' ;; 8200 esac ;; 8201 esac 8202 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8203 ;; 8204 8205 sunos4*) 8206 if test "x$host_vendor" = xsequent; then 8207 # Use $CC to link under sequent, because it throws in some extra .o 8208 # files that make .init and .fini sections work. 8209 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 8210 else 8211 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 8212 fi 8213 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8214 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8215 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8216 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8217 ;; 8218 8219 sysv4) 8220 case $host_vendor in 8221 sni) 8222 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8223 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 8224 ;; 8225 siemens) 8226 ## LD is ld it makes a PLAMLIB 8227 ## CC just makes a GrossModule. 8228 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 8229 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 8230 _LT_AC_TAGVAR(hardcode_direct, $1)=no 8231 ;; 8232 motorola) 8233 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8234 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 8235 ;; 8236 esac 8237 runpath_var='LD_RUN_PATH' 8238 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8239 ;; 8240 8241 sysv4.3*) 8242 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8243 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8244 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 8245 ;; 8246 8247 sysv4*MP*) 8248 if test -d /usr/nec; then 8249 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8250 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8251 runpath_var=LD_RUN_PATH 8252 hardcode_runpath_var=yes 8253 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 8254 fi 8255 ;; 8256 8257 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) 8258 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8259 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8260 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8261 runpath_var='LD_RUN_PATH' 8262 8263 if test "$GCC" = yes; then 8264 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8265 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8266 else 8267 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8268 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8269 fi 8270 ;; 8271 8272 sysv5* | sco3.2v5* | sco5v6*) 8273 # Note: We can NOT use -z defs as we might desire, because we do not 8274 # link with -lc, and that would cause any symbols used from libc to 8275 # always be unresolved, which means just about no library would 8276 # ever link correctly. If we're not using GNU ld we use -z text 8277 # though, which does catch some bad symbols but isn't as heavy-handed 8278 # as -z defs. 8279 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8280 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8281 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8282 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8283 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 8284 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 8285 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8286 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8287 runpath_var='LD_RUN_PATH' 8288 8289 if test "$GCC" = yes; then 8290 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8291 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8292 else 8293 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8294 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 8295 fi 8296 ;; 8297 8298 uts4*) 8299 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8301 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8302 ;; 8303 8304 *) 8305 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8306 ;; 8307 esac 8308 fi 8309]) 8310AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 8311test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8312 8313# 8314# Do we need to explicitly link libc? 8315# 8316case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 8317x|xyes) 8318 # Assume -lc should be added 8319 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 8320 8321 if test "$enable_shared" = yes && test "$GCC" = yes; then 8322 case $_LT_AC_TAGVAR(archive_cmds, $1) in 8323 *'~'*) 8324 # FIXME: we may have to deal with multi-command sequences. 8325 ;; 8326 '$CC '*) 8327 # Test whether the compiler implicitly links with -lc since on some 8328 # systems, -lgcc has to come before -lc. If gcc already passes -lc 8329 # to ld, don't add -lc before -lgcc. 8330 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 8331 $rm conftest* 8332 printf "$lt_simple_compile_test_code" > conftest.$ac_ext 8333 8334 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 8335 soname=conftest 8336 lib=conftest 8337 libobjs=conftest.$ac_objext 8338 deplibs= 8339 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 8340 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 8341 compiler_flags=-v 8342 linker_flags=-v 8343 verstring= 8344 output_objdir=. 8345 libname=conftest 8346 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 8347 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 8348 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 8349 then 8350 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8351 else 8352 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 8353 fi 8354 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 8355 else 8356 cat conftest.err 1>&5 8357 fi 8358 $rm conftest* 8359 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 8360 ;; 8361 esac 8362 fi 8363 ;; 8364esac 8365])# AC_LIBTOOL_PROG_LD_SHLIBS 8366 8367 8368# _LT_AC_FILE_LTDLL_C 8369# ------------------- 8370# Be careful that the start marker always follows a newline. 8371AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 8372# /* ltdll.c starts here */ 8373# #define WIN32_LEAN_AND_MEAN 8374# #include <windows.h> 8375# #undef WIN32_LEAN_AND_MEAN 8376# #include <stdio.h> 8377# 8378# #ifndef __CYGWIN__ 8379# # ifdef __CYGWIN32__ 8380# # define __CYGWIN__ __CYGWIN32__ 8381# # endif 8382# #endif 8383# 8384# #ifdef __cplusplus 8385# extern "C" { 8386# #endif 8387# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 8388# #ifdef __cplusplus 8389# } 8390# #endif 8391# 8392# #ifdef __CYGWIN__ 8393# #include <cygwin/cygwin_dll.h> 8394# DECLARE_CYGWIN_DLL( DllMain ); 8395# #endif 8396# HINSTANCE __hDllInstance_base; 8397# 8398# BOOL APIENTRY 8399# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 8400# { 8401# __hDllInstance_base = hInst; 8402# return TRUE; 8403# } 8404# /* ltdll.c ends here */ 8405])# _LT_AC_FILE_LTDLL_C 8406 8407 8408# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 8409# --------------------------------- 8410AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 8411 8412 8413# old names 8414AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 8415AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8416AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8417AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8418AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8419AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 8420AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 8421 8422# This is just to silence aclocal about the macro not being used 8423ifelse([AC_DISABLE_FAST_INSTALL]) 8424 8425AC_DEFUN([LT_AC_PROG_GCJ], 8426[AC_CHECK_TOOL(GCJ, gcj, no) 8427 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8428 AC_SUBST(GCJFLAGS) 8429]) 8430 8431AC_DEFUN([LT_AC_PROG_RC], 8432[AC_CHECK_TOOL(RC, windres, no) 8433]) 8434 8435# NOTE: This macro has been submitted for inclusion into # 8436# GNU Autoconf as AC_PROG_SED. When it is available in # 8437# a released version of Autoconf we should remove this # 8438# macro and use it instead. # 8439# LT_AC_PROG_SED 8440# -------------- 8441# Check for a fully-functional sed program, that truncates 8442# as few characters as possible. Prefer GNU sed if found. 8443AC_DEFUN([LT_AC_PROG_SED], 8444[AC_MSG_CHECKING([for a sed that does not truncate output]) 8445AC_CACHE_VAL(lt_cv_path_SED, 8446[# Loop through the user's path and test for sed and gsed. 8447# Then use that list of sed's as ones to test for truncation. 8448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8449for as_dir in $PATH 8450do 8451 IFS=$as_save_IFS 8452 test -z "$as_dir" && as_dir=. 8453 for lt_ac_prog in sed gsed; do 8454 for ac_exec_ext in '' $ac_executable_extensions; do 8455 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8456 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8457 fi 8458 done 8459 done 8460done 8461lt_ac_max=0 8462lt_ac_count=0 8463# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8464# along with /bin/sed that truncates output. 8465for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8466 test ! -f $lt_ac_sed && continue 8467 cat /dev/null > conftest.in 8468 lt_ac_count=0 8469 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8470 # Check for GNU sed and select it if it is found. 8471 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8472 lt_cv_path_SED=$lt_ac_sed 8473 break 8474 fi 8475 while true; do 8476 cat conftest.in conftest.in >conftest.tmp 8477 mv conftest.tmp conftest.in 8478 cp conftest.in conftest.nl 8479 echo >>conftest.nl 8480 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8481 cmp -s conftest.out conftest.nl || break 8482 # 10000 chars as input seems more than enough 8483 test $lt_ac_count -gt 10 && break 8484 lt_ac_count=`expr $lt_ac_count + 1` 8485 if test $lt_ac_count -gt $lt_ac_max; then 8486 lt_ac_max=$lt_ac_count 8487 lt_cv_path_SED=$lt_ac_sed 8488 fi 8489 done 8490done 8491]) 8492SED=$lt_cv_path_SED 8493AC_MSG_RESULT([$SED]) 8494]) 8495 8496# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8497# 8498# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8499# 8500# This program is free software; you can redistribute it and/or modify 8501# it under the terms of the GNU General Public License as published by 8502# the Free Software Foundation; either version 2 of the License, or 8503# (at your option) any later version. 8504# 8505# This program is distributed in the hope that it will be useful, but 8506# WITHOUT ANY WARRANTY; without even the implied warranty of 8507# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8508# General Public License for more details. 8509# 8510# You should have received a copy of the GNU General Public License 8511# along with this program; if not, write to the Free Software 8512# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8513# 8514# As a special exception to the GNU General Public License, if you 8515# distribute this file as part of a program that contains a 8516# configuration script generated by Autoconf, you may include it under 8517# the same distribution terms that you use for the rest of that program. 8518 8519# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8520# ---------------------------------- 8521AC_DEFUN([PKG_PROG_PKG_CONFIG], 8522[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8523m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8524AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8525if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8526 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8527fi 8528if test -n "$PKG_CONFIG"; then 8529 _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 8530 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8531 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8532 AC_MSG_RESULT([yes]) 8533 else 8534 AC_MSG_RESULT([no]) 8535 PKG_CONFIG="" 8536 fi 8537 8538fi[]dnl 8539])# PKG_PROG_PKG_CONFIG 8540 8541# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8542# 8543# Check to see whether a particular set of modules exists. Similar 8544# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8545# 8546# 8547# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8548# this or PKG_CHECK_MODULES is called, or make sure to call 8549# PKG_CHECK_EXISTS manually 8550# -------------------------------------------------------------- 8551AC_DEFUN([PKG_CHECK_EXISTS], 8552[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8553if test -n "$PKG_CONFIG" && \ 8554 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8555 m4_ifval([$2], [$2], [:]) 8556m4_ifvaln([$3], [else 8557 $3])dnl 8558fi]) 8559 8560 8561# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8562# --------------------------------------------- 8563m4_define([_PKG_CONFIG], 8564[if test -n "$PKG_CONFIG"; then 8565 PKG_CHECK_EXISTS([$3], 8566 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8567 [pkg_failed=yes]) 8568else 8569 pkg_failed=untried 8570fi[]dnl 8571])# _PKG_CONFIG 8572 8573# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8574# [ACTION-IF-NOT-FOUND]) 8575# 8576# 8577# Note that if there is a possibility the first call to 8578# PKG_CHECK_MODULES might not happen, you should be sure to include an 8579# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8580# 8581# 8582# -------------------------------------------------------------- 8583AC_DEFUN([PKG_CHECK_MODULES], 8584[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8585AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8586AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8587 8588pkg_failed=no 8589AC_MSG_CHECKING([for $1]) 8590 8591_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8592_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8593 8594if test $pkg_failed = yes; then 8595 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 8596 # Put the nasty error message in config.log where it belongs 8597 echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 8598 8599 ifelse([$4], , [AC_MSG_ERROR(dnl 8600[Package requirements ($2) were not met. 8601Consider adjusting the PKG_CONFIG_PATH environment variable if you 8602installed software in a non-standard prefix. 8603 8604Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables 8605to avoid the need to call pkg-config. See the pkg-config man page for 8606more details.])], 8607 [$4]) 8608elif test $pkg_failed = untried; then 8609 ifelse([$4], , [AC_MSG_FAILURE(dnl 8610[The pkg-config script could not be found or is too old. Make sure it 8611is in your PATH or set the PKG_CONFIG environment variable to the full 8612path to pkg-config. 8613 8614Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables 8615to avoid the need to call pkg-config. See the pkg-config man page for 8616more details. 8617 8618To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 8619 [$4]) 8620else 8621 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8622 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8623 AC_MSG_RESULT([yes]) 8624 ifelse([$3], , :, [$3]) 8625fi[]dnl 8626])# PKG_CHECK_MODULES 8627 8628