annotate src/flac-1.2.1/aclocal.m4 @ 56:af97cad61ff0

Add updated build of PortAudio for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 15:10:52 +0000
parents 05aa0afa9217
children
rev   line source
Chris@1 1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
Chris@1 2
Chris@1 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
Chris@1 4 # Free Software Foundation, Inc.
Chris@1 5 # This file is free software; the Free Software Foundation
Chris@1 6 # gives unlimited permission to copy and/or distribute it,
Chris@1 7 # with or without modifications, as long as this notice is preserved.
Chris@1 8
Chris@1 9 # This program is distributed in the hope that it will be useful,
Chris@1 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
Chris@1 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
Chris@1 12 # PARTICULAR PURPOSE.
Chris@1 13
Chris@1 14 # Do all the work for Automake. -*- Autoconf -*-
Chris@1 15
Chris@1 16 # This macro actually does too much some checks are only needed if
Chris@1 17 # your package does certain things. But this isn't really a big deal.
Chris@1 18
Chris@1 19 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Chris@1 20 # Free Software Foundation, Inc.
Chris@1 21
Chris@1 22 # This program is free software; you can redistribute it and/or modify
Chris@1 23 # it under the terms of the GNU General Public License as published by
Chris@1 24 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 25 # any later version.
Chris@1 26
Chris@1 27 # This program is distributed in the hope that it will be useful,
Chris@1 28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 30 # GNU General Public License for more details.
Chris@1 31
Chris@1 32 # You should have received a copy of the GNU General Public License
Chris@1 33 # along with this program; if not, write to the Free Software
Chris@1 34 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 35 # 02111-1307, USA.
Chris@1 36
Chris@1 37 # serial 10
Chris@1 38
Chris@1 39 AC_PREREQ([2.54])
Chris@1 40
Chris@1 41 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
Chris@1 42 # the ones we care about.
Chris@1 43 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
Chris@1 44
Chris@1 45 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
Chris@1 46 # AM_INIT_AUTOMAKE([OPTIONS])
Chris@1 47 # -----------------------------------------------
Chris@1 48 # The call with PACKAGE and VERSION arguments is the old style
Chris@1 49 # call (pre autoconf-2.50), which is being phased out. PACKAGE
Chris@1 50 # and VERSION should now be passed to AC_INIT and removed from
Chris@1 51 # the call to AM_INIT_AUTOMAKE.
Chris@1 52 # We support both call styles for the transition. After
Chris@1 53 # the next Automake release, Autoconf can make the AC_INIT
Chris@1 54 # arguments mandatory, and then we can depend on a new Autoconf
Chris@1 55 # release and drop the old call support.
Chris@1 56 AC_DEFUN([AM_INIT_AUTOMAKE],
Chris@1 57 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
Chris@1 58 AC_REQUIRE([AC_PROG_INSTALL])dnl
Chris@1 59 # test to see if srcdir already configured
Chris@1 60 if test "`cd $srcdir && pwd`" != "`pwd`" &&
Chris@1 61 test -f $srcdir/config.status; then
Chris@1 62 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
Chris@1 63 fi
Chris@1 64
Chris@1 65 # test whether we have cygpath
Chris@1 66 if test -z "$CYGPATH_W"; then
Chris@1 67 if (cygpath --version) >/dev/null 2>/dev/null; then
Chris@1 68 CYGPATH_W='cygpath -w'
Chris@1 69 else
Chris@1 70 CYGPATH_W=echo
Chris@1 71 fi
Chris@1 72 fi
Chris@1 73 AC_SUBST([CYGPATH_W])
Chris@1 74
Chris@1 75 # Define the identity of the package.
Chris@1 76 dnl Distinguish between old-style and new-style calls.
Chris@1 77 m4_ifval([$2],
Chris@1 78 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
Chris@1 79 AC_SUBST([PACKAGE], [$1])dnl
Chris@1 80 AC_SUBST([VERSION], [$2])],
Chris@1 81 [_AM_SET_OPTIONS([$1])dnl
Chris@1 82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
Chris@1 83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
Chris@1 84
Chris@1 85 _AM_IF_OPTION([no-define],,
Chris@1 86 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
Chris@1 87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
Chris@1 88
Chris@1 89 # Some tools Automake needs.
Chris@1 90 AC_REQUIRE([AM_SANITY_CHECK])dnl
Chris@1 91 AC_REQUIRE([AC_ARG_PROGRAM])dnl
Chris@1 92 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
Chris@1 93 AM_MISSING_PROG(AUTOCONF, autoconf)
Chris@1 94 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
Chris@1 95 AM_MISSING_PROG(AUTOHEADER, autoheader)
Chris@1 96 AM_MISSING_PROG(MAKEINFO, makeinfo)
Chris@1 97 AM_MISSING_PROG(AMTAR, tar)
Chris@1 98 AM_PROG_INSTALL_SH
Chris@1 99 AM_PROG_INSTALL_STRIP
Chris@1 100 # We need awk for the "check" target. The system "awk" is bad on
Chris@1 101 # some platforms.
Chris@1 102 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@1 103 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
Chris@1 104 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Chris@1 105
Chris@1 106 _AM_IF_OPTION([no-dependencies],,
Chris@1 107 [AC_PROVIDE_IFELSE([AC_PROG_CC],
Chris@1 108 [_AM_DEPENDENCIES(CC)],
Chris@1 109 [define([AC_PROG_CC],
Chris@1 110 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
Chris@1 111 AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@1 112 [_AM_DEPENDENCIES(CXX)],
Chris@1 113 [define([AC_PROG_CXX],
Chris@1 114 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
Chris@1 115 ])
Chris@1 116 ])
Chris@1 117
Chris@1 118
Chris@1 119 # When config.status generates a header, we must update the stamp-h file.
Chris@1 120 # This file resides in the same directory as the config header
Chris@1 121 # that is generated. The stamp files are numbered to have different names.
Chris@1 122
Chris@1 123 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
Chris@1 124 # loop where config.status creates the headers, so we can generate
Chris@1 125 # our stamp files there.
Chris@1 126 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
Chris@1 127 [# Compute $1's index in $config_headers.
Chris@1 128 _am_stamp_count=1
Chris@1 129 for _am_header in $config_headers :; do
Chris@1 130 case $_am_header in
Chris@1 131 $1 | $1:* )
Chris@1 132 break ;;
Chris@1 133 * )
Chris@1 134 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
Chris@1 135 esac
Chris@1 136 done
Chris@1 137 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
Chris@1 138
Chris@1 139 # Copyright 2002 Free Software Foundation, Inc.
Chris@1 140
Chris@1 141 # This program is free software; you can redistribute it and/or modify
Chris@1 142 # it under the terms of the GNU General Public License as published by
Chris@1 143 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 144 # any later version.
Chris@1 145
Chris@1 146 # This program is distributed in the hope that it will be useful,
Chris@1 147 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 148 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 149 # GNU General Public License for more details.
Chris@1 150
Chris@1 151 # You should have received a copy of the GNU General Public License
Chris@1 152 # along with this program; if not, write to the Free Software
Chris@1 153 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 154
Chris@1 155 # AM_AUTOMAKE_VERSION(VERSION)
Chris@1 156 # ----------------------------
Chris@1 157 # Automake X.Y traces this macro to ensure aclocal.m4 has been
Chris@1 158 # generated from the m4 files accompanying Automake X.Y.
Chris@1 159 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
Chris@1 160
Chris@1 161 # AM_SET_CURRENT_AUTOMAKE_VERSION
Chris@1 162 # -------------------------------
Chris@1 163 # Call AM_AUTOMAKE_VERSION so it can be traced.
Chris@1 164 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
Chris@1 165 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
Chris@1 166 [AM_AUTOMAKE_VERSION([1.7.9])])
Chris@1 167
Chris@1 168 # Helper functions for option handling. -*- Autoconf -*-
Chris@1 169
Chris@1 170 # Copyright 2001, 2002 Free Software Foundation, Inc.
Chris@1 171
Chris@1 172 # This program is free software; you can redistribute it and/or modify
Chris@1 173 # it under the terms of the GNU General Public License as published by
Chris@1 174 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 175 # any later version.
Chris@1 176
Chris@1 177 # This program is distributed in the hope that it will be useful,
Chris@1 178 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 180 # GNU General Public License for more details.
Chris@1 181
Chris@1 182 # You should have received a copy of the GNU General Public License
Chris@1 183 # along with this program; if not, write to the Free Software
Chris@1 184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 185 # 02111-1307, USA.
Chris@1 186
Chris@1 187 # serial 2
Chris@1 188
Chris@1 189 # _AM_MANGLE_OPTION(NAME)
Chris@1 190 # -----------------------
Chris@1 191 AC_DEFUN([_AM_MANGLE_OPTION],
Chris@1 192 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
Chris@1 193
Chris@1 194 # _AM_SET_OPTION(NAME)
Chris@1 195 # ------------------------------
Chris@1 196 # Set option NAME. Presently that only means defining a flag for this option.
Chris@1 197 AC_DEFUN([_AM_SET_OPTION],
Chris@1 198 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
Chris@1 199
Chris@1 200 # _AM_SET_OPTIONS(OPTIONS)
Chris@1 201 # ----------------------------------
Chris@1 202 # OPTIONS is a space-separated list of Automake options.
Chris@1 203 AC_DEFUN([_AM_SET_OPTIONS],
Chris@1 204 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
Chris@1 205
Chris@1 206 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
Chris@1 207 # -------------------------------------------
Chris@1 208 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
Chris@1 209 AC_DEFUN([_AM_IF_OPTION],
Chris@1 210 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
Chris@1 211
Chris@1 212 #
Chris@1 213 # Check to make sure that the build environment is sane.
Chris@1 214 #
Chris@1 215
Chris@1 216 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
Chris@1 217
Chris@1 218 # This program is free software; you can redistribute it and/or modify
Chris@1 219 # it under the terms of the GNU General Public License as published by
Chris@1 220 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 221 # any later version.
Chris@1 222
Chris@1 223 # This program is distributed in the hope that it will be useful,
Chris@1 224 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 226 # GNU General Public License for more details.
Chris@1 227
Chris@1 228 # You should have received a copy of the GNU General Public License
Chris@1 229 # along with this program; if not, write to the Free Software
Chris@1 230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 231 # 02111-1307, USA.
Chris@1 232
Chris@1 233 # serial 3
Chris@1 234
Chris@1 235 # AM_SANITY_CHECK
Chris@1 236 # ---------------
Chris@1 237 AC_DEFUN([AM_SANITY_CHECK],
Chris@1 238 [AC_MSG_CHECKING([whether build environment is sane])
Chris@1 239 # Just in case
Chris@1 240 sleep 1
Chris@1 241 echo timestamp > conftest.file
Chris@1 242 # Do `set' in a subshell so we don't clobber the current shell's
Chris@1 243 # arguments. Must try -L first in case configure is actually a
Chris@1 244 # symlink; some systems play weird games with the mod time of symlinks
Chris@1 245 # (eg FreeBSD returns the mod time of the symlink's containing
Chris@1 246 # directory).
Chris@1 247 if (
Chris@1 248 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
Chris@1 249 if test "$[*]" = "X"; then
Chris@1 250 # -L didn't work.
Chris@1 251 set X `ls -t $srcdir/configure conftest.file`
Chris@1 252 fi
Chris@1 253 rm -f conftest.file
Chris@1 254 if test "$[*]" != "X $srcdir/configure conftest.file" \
Chris@1 255 && test "$[*]" != "X conftest.file $srcdir/configure"; then
Chris@1 256
Chris@1 257 # If neither matched, then we have a broken ls. This can happen
Chris@1 258 # if, for instance, CONFIG_SHELL is bash and it inherits a
Chris@1 259 # broken ls alias from the environment. This has actually
Chris@1 260 # happened. Such a system could not be considered "sane".
Chris@1 261 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
Chris@1 262 alias in your environment])
Chris@1 263 fi
Chris@1 264
Chris@1 265 test "$[2]" = conftest.file
Chris@1 266 )
Chris@1 267 then
Chris@1 268 # Ok.
Chris@1 269 :
Chris@1 270 else
Chris@1 271 AC_MSG_ERROR([newly created file is older than distributed files!
Chris@1 272 Check your system clock])
Chris@1 273 fi
Chris@1 274 AC_MSG_RESULT(yes)])
Chris@1 275
Chris@1 276 # -*- Autoconf -*-
Chris@1 277
Chris@1 278
Chris@1 279 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
Chris@1 280
Chris@1 281 # This program is free software; you can redistribute it and/or modify
Chris@1 282 # it under the terms of the GNU General Public License as published by
Chris@1 283 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 284 # any later version.
Chris@1 285
Chris@1 286 # This program is distributed in the hope that it will be useful,
Chris@1 287 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 288 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 289 # GNU General Public License for more details.
Chris@1 290
Chris@1 291 # You should have received a copy of the GNU General Public License
Chris@1 292 # along with this program; if not, write to the Free Software
Chris@1 293 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 294 # 02111-1307, USA.
Chris@1 295
Chris@1 296 # serial 3
Chris@1 297
Chris@1 298 # AM_MISSING_PROG(NAME, PROGRAM)
Chris@1 299 # ------------------------------
Chris@1 300 AC_DEFUN([AM_MISSING_PROG],
Chris@1 301 [AC_REQUIRE([AM_MISSING_HAS_RUN])
Chris@1 302 $1=${$1-"${am_missing_run}$2"}
Chris@1 303 AC_SUBST($1)])
Chris@1 304
Chris@1 305
Chris@1 306 # AM_MISSING_HAS_RUN
Chris@1 307 # ------------------
Chris@1 308 # Define MISSING if not defined so far and test if it supports --run.
Chris@1 309 # If it does, set am_missing_run to use it, otherwise, to nothing.
Chris@1 310 AC_DEFUN([AM_MISSING_HAS_RUN],
Chris@1 311 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Chris@1 312 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
Chris@1 313 # Use eval to expand $SHELL
Chris@1 314 if eval "$MISSING --run true"; then
Chris@1 315 am_missing_run="$MISSING --run "
Chris@1 316 else
Chris@1 317 am_missing_run=
Chris@1 318 AC_MSG_WARN([`missing' script is too old or missing])
Chris@1 319 fi
Chris@1 320 ])
Chris@1 321
Chris@1 322 # AM_AUX_DIR_EXPAND
Chris@1 323
Chris@1 324 # Copyright 2001 Free Software Foundation, Inc.
Chris@1 325
Chris@1 326 # This program is free software; you can redistribute it and/or modify
Chris@1 327 # it under the terms of the GNU General Public License as published by
Chris@1 328 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 329 # any later version.
Chris@1 330
Chris@1 331 # This program is distributed in the hope that it will be useful,
Chris@1 332 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 333 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 334 # GNU General Public License for more details.
Chris@1 335
Chris@1 336 # You should have received a copy of the GNU General Public License
Chris@1 337 # along with this program; if not, write to the Free Software
Chris@1 338 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 339 # 02111-1307, USA.
Chris@1 340
Chris@1 341 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
Chris@1 342 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
Chris@1 343 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
Chris@1 344 #
Chris@1 345 # Of course, Automake must honor this variable whenever it calls a
Chris@1 346 # tool from the auxiliary directory. The problem is that $srcdir (and
Chris@1 347 # therefore $ac_aux_dir as well) can be either absolute or relative,
Chris@1 348 # depending on how configure is run. This is pretty annoying, since
Chris@1 349 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
Chris@1 350 # source directory, any form will work fine, but in subdirectories a
Chris@1 351 # relative path needs to be adjusted first.
Chris@1 352 #
Chris@1 353 # $ac_aux_dir/missing
Chris@1 354 # fails when called from a subdirectory if $ac_aux_dir is relative
Chris@1 355 # $top_srcdir/$ac_aux_dir/missing
Chris@1 356 # fails if $ac_aux_dir is absolute,
Chris@1 357 # fails when called from a subdirectory in a VPATH build with
Chris@1 358 # a relative $ac_aux_dir
Chris@1 359 #
Chris@1 360 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
Chris@1 361 # are both prefixed by $srcdir. In an in-source build this is usually
Chris@1 362 # harmless because $srcdir is `.', but things will broke when you
Chris@1 363 # start a VPATH build or use an absolute $srcdir.
Chris@1 364 #
Chris@1 365 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
Chris@1 366 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
Chris@1 367 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
Chris@1 368 # and then we would define $MISSING as
Chris@1 369 # MISSING="\${SHELL} $am_aux_dir/missing"
Chris@1 370 # This will work as long as MISSING is not called from configure, because
Chris@1 371 # unfortunately $(top_srcdir) has no meaning in configure.
Chris@1 372 # However there are other variables, like CC, which are often used in
Chris@1 373 # configure, and could therefore not use this "fixed" $ac_aux_dir.
Chris@1 374 #
Chris@1 375 # Another solution, used here, is to always expand $ac_aux_dir to an
Chris@1 376 # absolute PATH. The drawback is that using absolute paths prevent a
Chris@1 377 # configured tree to be moved without reconfiguration.
Chris@1 378
Chris@1 379 # Rely on autoconf to set up CDPATH properly.
Chris@1 380 AC_PREREQ([2.50])
Chris@1 381
Chris@1 382 AC_DEFUN([AM_AUX_DIR_EXPAND], [
Chris@1 383 # expand $ac_aux_dir to an absolute path
Chris@1 384 am_aux_dir=`cd $ac_aux_dir && pwd`
Chris@1 385 ])
Chris@1 386
Chris@1 387 # AM_PROG_INSTALL_SH
Chris@1 388 # ------------------
Chris@1 389 # Define $install_sh.
Chris@1 390
Chris@1 391 # Copyright 2001 Free Software Foundation, Inc.
Chris@1 392
Chris@1 393 # This program is free software; you can redistribute it and/or modify
Chris@1 394 # it under the terms of the GNU General Public License as published by
Chris@1 395 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 396 # any later version.
Chris@1 397
Chris@1 398 # This program is distributed in the hope that it will be useful,
Chris@1 399 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 400 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 401 # GNU General Public License for more details.
Chris@1 402
Chris@1 403 # You should have received a copy of the GNU General Public License
Chris@1 404 # along with this program; if not, write to the Free Software
Chris@1 405 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 406 # 02111-1307, USA.
Chris@1 407
Chris@1 408 AC_DEFUN([AM_PROG_INSTALL_SH],
Chris@1 409 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
Chris@1 410 install_sh=${install_sh-"$am_aux_dir/install-sh"}
Chris@1 411 AC_SUBST(install_sh)])
Chris@1 412
Chris@1 413 # AM_PROG_INSTALL_STRIP
Chris@1 414
Chris@1 415 # Copyright 2001 Free Software Foundation, Inc.
Chris@1 416
Chris@1 417 # This program is free software; you can redistribute it and/or modify
Chris@1 418 # it under the terms of the GNU General Public License as published by
Chris@1 419 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 420 # any later version.
Chris@1 421
Chris@1 422 # This program is distributed in the hope that it will be useful,
Chris@1 423 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 424 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 425 # GNU General Public License for more details.
Chris@1 426
Chris@1 427 # You should have received a copy of the GNU General Public License
Chris@1 428 # along with this program; if not, write to the Free Software
Chris@1 429 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 430 # 02111-1307, USA.
Chris@1 431
Chris@1 432 # One issue with vendor `install' (even GNU) is that you can't
Chris@1 433 # specify the program used to strip binaries. This is especially
Chris@1 434 # annoying in cross-compiling environments, where the build's strip
Chris@1 435 # is unlikely to handle the host's binaries.
Chris@1 436 # Fortunately install-sh will honor a STRIPPROG variable, so we
Chris@1 437 # always use install-sh in `make install-strip', and initialize
Chris@1 438 # STRIPPROG with the value of the STRIP variable (set by the user).
Chris@1 439 AC_DEFUN([AM_PROG_INSTALL_STRIP],
Chris@1 440 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
Chris@1 441 # Installed binaries are usually stripped using `strip' when the user
Chris@1 442 # run `make install-strip'. However `strip' might not be the right
Chris@1 443 # tool to use in cross-compilation environments, therefore Automake
Chris@1 444 # will honor the `STRIP' environment variable to overrule this program.
Chris@1 445 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
Chris@1 446 if test "$cross_compiling" != no; then
Chris@1 447 AC_CHECK_TOOL([STRIP], [strip], :)
Chris@1 448 fi
Chris@1 449 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
Chris@1 450 AC_SUBST([INSTALL_STRIP_PROGRAM])])
Chris@1 451
Chris@1 452 # -*- Autoconf -*-
Chris@1 453 # Copyright (C) 2003 Free Software Foundation, Inc.
Chris@1 454
Chris@1 455 # This program is free software; you can redistribute it and/or modify
Chris@1 456 # it under the terms of the GNU General Public License as published by
Chris@1 457 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 458 # any later version.
Chris@1 459
Chris@1 460 # This program is distributed in the hope that it will be useful,
Chris@1 461 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 463 # GNU General Public License for more details.
Chris@1 464
Chris@1 465 # You should have received a copy of the GNU General Public License
Chris@1 466 # along with this program; if not, write to the Free Software
Chris@1 467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 468 # 02111-1307, USA.
Chris@1 469
Chris@1 470 # serial 1
Chris@1 471
Chris@1 472 # Check whether the underlying file-system supports filenames
Chris@1 473 # with a leading dot. For instance MS-DOS doesn't.
Chris@1 474 AC_DEFUN([AM_SET_LEADING_DOT],
Chris@1 475 [rm -rf .tst 2>/dev/null
Chris@1 476 mkdir .tst 2>/dev/null
Chris@1 477 if test -d .tst; then
Chris@1 478 am__leading_dot=.
Chris@1 479 else
Chris@1 480 am__leading_dot=_
Chris@1 481 fi
Chris@1 482 rmdir .tst 2>/dev/null
Chris@1 483 AC_SUBST([am__leading_dot])])
Chris@1 484
Chris@1 485 # serial 5 -*- Autoconf -*-
Chris@1 486
Chris@1 487 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Chris@1 488
Chris@1 489 # This program is free software; you can redistribute it and/or modify
Chris@1 490 # it under the terms of the GNU General Public License as published by
Chris@1 491 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 492 # any later version.
Chris@1 493
Chris@1 494 # This program is distributed in the hope that it will be useful,
Chris@1 495 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 496 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 497 # GNU General Public License for more details.
Chris@1 498
Chris@1 499 # You should have received a copy of the GNU General Public License
Chris@1 500 # along with this program; if not, write to the Free Software
Chris@1 501 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 502 # 02111-1307, USA.
Chris@1 503
Chris@1 504
Chris@1 505 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
Chris@1 506 # written in clear, in which case automake, when reading aclocal.m4,
Chris@1 507 # will think it sees a *use*, and therefore will trigger all it's
Chris@1 508 # C support machinery. Also note that it means that autoscan, seeing
Chris@1 509 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
Chris@1 510
Chris@1 511
Chris@1 512
Chris@1 513 # _AM_DEPENDENCIES(NAME)
Chris@1 514 # ----------------------
Chris@1 515 # See how the compiler implements dependency checking.
Chris@1 516 # NAME is "CC", "CXX", "GCJ", or "OBJC".
Chris@1 517 # We try a few techniques and use that to set a single cache variable.
Chris@1 518 #
Chris@1 519 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
Chris@1 520 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
Chris@1 521 # dependency, and given that the user is not expected to run this macro,
Chris@1 522 # just rely on AC_PROG_CC.
Chris@1 523 AC_DEFUN([_AM_DEPENDENCIES],
Chris@1 524 [AC_REQUIRE([AM_SET_DEPDIR])dnl
Chris@1 525 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
Chris@1 526 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
Chris@1 527 AC_REQUIRE([AM_DEP_TRACK])dnl
Chris@1 528
Chris@1 529 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
Chris@1 530 [$1], CXX, [depcc="$CXX" am_compiler_list=],
Chris@1 531 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
Chris@1 532 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
Chris@1 533 [depcc="$$1" am_compiler_list=])
Chris@1 534
Chris@1 535 AC_CACHE_CHECK([dependency style of $depcc],
Chris@1 536 [am_cv_$1_dependencies_compiler_type],
Chris@1 537 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
Chris@1 538 # We make a subdir and do the tests there. Otherwise we can end up
Chris@1 539 # making bogus files that we don't know about and never remove. For
Chris@1 540 # instance it was reported that on HP-UX the gcc test will end up
Chris@1 541 # making a dummy file named `D' -- because `-MD' means `put the output
Chris@1 542 # in D'.
Chris@1 543 mkdir conftest.dir
Chris@1 544 # Copy depcomp to subdir because otherwise we won't find it if we're
Chris@1 545 # using a relative directory.
Chris@1 546 cp "$am_depcomp" conftest.dir
Chris@1 547 cd conftest.dir
Chris@1 548 # We will build objects and dependencies in a subdirectory because
Chris@1 549 # it helps to detect inapplicable dependency modes. For instance
Chris@1 550 # both Tru64's cc and ICC support -MD to output dependencies as a
Chris@1 551 # side effect of compilation, but ICC will put the dependencies in
Chris@1 552 # the current directory while Tru64 will put them in the object
Chris@1 553 # directory.
Chris@1 554 mkdir sub
Chris@1 555
Chris@1 556 am_cv_$1_dependencies_compiler_type=none
Chris@1 557 if test "$am_compiler_list" = ""; then
Chris@1 558 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
Chris@1 559 fi
Chris@1 560 for depmode in $am_compiler_list; do
Chris@1 561 # Setup a source with many dependencies, because some compilers
Chris@1 562 # like to wrap large dependency lists on column 80 (with \), and
Chris@1 563 # we should not choose a depcomp mode which is confused by this.
Chris@1 564 #
Chris@1 565 # We need to recreate these files for each test, as the compiler may
Chris@1 566 # overwrite some of them when testing with obscure command lines.
Chris@1 567 # This happens at least with the AIX C compiler.
Chris@1 568 : > sub/conftest.c
Chris@1 569 for i in 1 2 3 4 5 6; do
Chris@1 570 echo '#include "conftst'$i'.h"' >> sub/conftest.c
Chris@1 571 : > sub/conftst$i.h
Chris@1 572 done
Chris@1 573 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
Chris@1 574
Chris@1 575 case $depmode in
Chris@1 576 nosideeffect)
Chris@1 577 # after this tag, mechanisms are not by side-effect, so they'll
Chris@1 578 # only be used when explicitly requested
Chris@1 579 if test "x$enable_dependency_tracking" = xyes; then
Chris@1 580 continue
Chris@1 581 else
Chris@1 582 break
Chris@1 583 fi
Chris@1 584 ;;
Chris@1 585 none) break ;;
Chris@1 586 esac
Chris@1 587 # We check with `-c' and `-o' for the sake of the "dashmstdout"
Chris@1 588 # mode. It turns out that the SunPro C++ compiler does not properly
Chris@1 589 # handle `-M -o', and we need to detect this.
Chris@1 590 if depmode=$depmode \
Chris@1 591 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
Chris@1 592 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
Chris@1 593 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
Chris@1 594 >/dev/null 2>conftest.err &&
Chris@1 595 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
Chris@1 596 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
Chris@1 597 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
Chris@1 598 # icc doesn't choke on unknown options, it will just issue warnings
Chris@1 599 # (even with -Werror). So we grep stderr for any message
Chris@1 600 # that says an option was ignored.
Chris@1 601 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
Chris@1 602 am_cv_$1_dependencies_compiler_type=$depmode
Chris@1 603 break
Chris@1 604 fi
Chris@1 605 fi
Chris@1 606 done
Chris@1 607
Chris@1 608 cd ..
Chris@1 609 rm -rf conftest.dir
Chris@1 610 else
Chris@1 611 am_cv_$1_dependencies_compiler_type=none
Chris@1 612 fi
Chris@1 613 ])
Chris@1 614 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
Chris@1 615 AM_CONDITIONAL([am__fastdep$1], [
Chris@1 616 test "x$enable_dependency_tracking" != xno \
Chris@1 617 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
Chris@1 618 ])
Chris@1 619
Chris@1 620
Chris@1 621 # AM_SET_DEPDIR
Chris@1 622 # -------------
Chris@1 623 # Choose a directory name for dependency files.
Chris@1 624 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
Chris@1 625 AC_DEFUN([AM_SET_DEPDIR],
Chris@1 626 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
Chris@1 627 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
Chris@1 628 ])
Chris@1 629
Chris@1 630
Chris@1 631 # AM_DEP_TRACK
Chris@1 632 # ------------
Chris@1 633 AC_DEFUN([AM_DEP_TRACK],
Chris@1 634 [AC_ARG_ENABLE(dependency-tracking,
Chris@1 635 [ --disable-dependency-tracking Speeds up one-time builds
Chris@1 636 --enable-dependency-tracking Do not reject slow dependency extractors])
Chris@1 637 if test "x$enable_dependency_tracking" != xno; then
Chris@1 638 am_depcomp="$ac_aux_dir/depcomp"
Chris@1 639 AMDEPBACKSLASH='\'
Chris@1 640 fi
Chris@1 641 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
Chris@1 642 AC_SUBST([AMDEPBACKSLASH])
Chris@1 643 ])
Chris@1 644
Chris@1 645 # Generate code to set up dependency tracking. -*- Autoconf -*-
Chris@1 646
Chris@1 647 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Chris@1 648
Chris@1 649 # This program is free software; you can redistribute it and/or modify
Chris@1 650 # it under the terms of the GNU General Public License as published by
Chris@1 651 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 652 # any later version.
Chris@1 653
Chris@1 654 # This program is distributed in the hope that it will be useful,
Chris@1 655 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 656 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 657 # GNU General Public License for more details.
Chris@1 658
Chris@1 659 # You should have received a copy of the GNU General Public License
Chris@1 660 # along with this program; if not, write to the Free Software
Chris@1 661 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 662 # 02111-1307, USA.
Chris@1 663
Chris@1 664 #serial 2
Chris@1 665
Chris@1 666 # _AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@1 667 # ------------------------------
Chris@1 668 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@1 669 [for mf in $CONFIG_FILES; do
Chris@1 670 # Strip MF so we end up with the name of the file.
Chris@1 671 mf=`echo "$mf" | sed -e 's/:.*$//'`
Chris@1 672 # Check whether this is an Automake generated Makefile or not.
Chris@1 673 # We used to match only the files named `Makefile.in', but
Chris@1 674 # some people rename them; so instead we look at the file content.
Chris@1 675 # Grep'ing the first line is not enough: some people post-process
Chris@1 676 # each Makefile.in and add a new line on top of each file to say so.
Chris@1 677 # So let's grep whole file.
Chris@1 678 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
Chris@1 679 dirpart=`AS_DIRNAME("$mf")`
Chris@1 680 else
Chris@1 681 continue
Chris@1 682 fi
Chris@1 683 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
Chris@1 684 # Extract the definition of DEP_FILES from the Makefile without
Chris@1 685 # running `make'.
Chris@1 686 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
Chris@1 687 test -z "$DEPDIR" && continue
Chris@1 688 # When using ansi2knr, U may be empty or an underscore; expand it
Chris@1 689 U=`sed -n -e '/^U = / s///p' < "$mf"`
Chris@1 690 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
Chris@1 691 # We invoke sed twice because it is the simplest approach to
Chris@1 692 # changing $(DEPDIR) to its actual value in the expansion.
Chris@1 693 for file in `sed -n -e '
Chris@1 694 /^DEP_FILES = .*\\\\$/ {
Chris@1 695 s/^DEP_FILES = //
Chris@1 696 :loop
Chris@1 697 s/\\\\$//
Chris@1 698 p
Chris@1 699 n
Chris@1 700 /\\\\$/ b loop
Chris@1 701 p
Chris@1 702 }
Chris@1 703 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
Chris@1 704 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
Chris@1 705 # Make sure the directory exists.
Chris@1 706 test -f "$dirpart/$file" && continue
Chris@1 707 fdir=`AS_DIRNAME(["$file"])`
Chris@1 708 AS_MKDIR_P([$dirpart/$fdir])
Chris@1 709 # echo "creating $dirpart/$file"
Chris@1 710 echo '# dummy' > "$dirpart/$file"
Chris@1 711 done
Chris@1 712 done
Chris@1 713 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@1 714
Chris@1 715
Chris@1 716 # AM_OUTPUT_DEPENDENCY_COMMANDS
Chris@1 717 # -----------------------------
Chris@1 718 # This macro should only be invoked once -- use via AC_REQUIRE.
Chris@1 719 #
Chris@1 720 # This code is only required when automatic dependency tracking
Chris@1 721 # is enabled. FIXME. This creates each `.P' file that we will
Chris@1 722 # need in order to bootstrap the dependency handling code.
Chris@1 723 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@1 724 [AC_CONFIG_COMMANDS([depfiles],
Chris@1 725 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
Chris@1 726 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
Chris@1 727 ])
Chris@1 728
Chris@1 729 # Check to see how 'make' treats includes. -*- Autoconf -*-
Chris@1 730
Chris@1 731 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
Chris@1 732
Chris@1 733 # This program is free software; you can redistribute it and/or modify
Chris@1 734 # it under the terms of the GNU General Public License as published by
Chris@1 735 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 736 # any later version.
Chris@1 737
Chris@1 738 # This program is distributed in the hope that it will be useful,
Chris@1 739 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 740 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 741 # GNU General Public License for more details.
Chris@1 742
Chris@1 743 # You should have received a copy of the GNU General Public License
Chris@1 744 # along with this program; if not, write to the Free Software
Chris@1 745 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 746 # 02111-1307, USA.
Chris@1 747
Chris@1 748 # serial 2
Chris@1 749
Chris@1 750 # AM_MAKE_INCLUDE()
Chris@1 751 # -----------------
Chris@1 752 # Check to see how make treats includes.
Chris@1 753 AC_DEFUN([AM_MAKE_INCLUDE],
Chris@1 754 [am_make=${MAKE-make}
Chris@1 755 cat > confinc << 'END'
Chris@1 756 am__doit:
Chris@1 757 @echo done
Chris@1 758 .PHONY: am__doit
Chris@1 759 END
Chris@1 760 # If we don't find an include directive, just comment out the code.
Chris@1 761 AC_MSG_CHECKING([for style of include used by $am_make])
Chris@1 762 am__include="#"
Chris@1 763 am__quote=
Chris@1 764 _am_result=none
Chris@1 765 # First try GNU make style include.
Chris@1 766 echo "include confinc" > confmf
Chris@1 767 # We grep out `Entering directory' and `Leaving directory'
Chris@1 768 # messages which can occur if `w' ends up in MAKEFLAGS.
Chris@1 769 # In particular we don't look at `^make:' because GNU make might
Chris@1 770 # be invoked under some other name (usually "gmake"), in which
Chris@1 771 # case it prints its new name instead of `make'.
Chris@1 772 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
Chris@1 773 am__include=include
Chris@1 774 am__quote=
Chris@1 775 _am_result=GNU
Chris@1 776 fi
Chris@1 777 # Now try BSD make style include.
Chris@1 778 if test "$am__include" = "#"; then
Chris@1 779 echo '.include "confinc"' > confmf
Chris@1 780 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
Chris@1 781 am__include=.include
Chris@1 782 am__quote="\""
Chris@1 783 _am_result=BSD
Chris@1 784 fi
Chris@1 785 fi
Chris@1 786 AC_SUBST([am__include])
Chris@1 787 AC_SUBST([am__quote])
Chris@1 788 AC_MSG_RESULT([$_am_result])
Chris@1 789 rm -f confinc confmf
Chris@1 790 ])
Chris@1 791
Chris@1 792 # AM_CONDITIONAL -*- Autoconf -*-
Chris@1 793
Chris@1 794 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
Chris@1 795
Chris@1 796 # This program is free software; you can redistribute it and/or modify
Chris@1 797 # it under the terms of the GNU General Public License as published by
Chris@1 798 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 799 # any later version.
Chris@1 800
Chris@1 801 # This program is distributed in the hope that it will be useful,
Chris@1 802 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 803 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 804 # GNU General Public License for more details.
Chris@1 805
Chris@1 806 # You should have received a copy of the GNU General Public License
Chris@1 807 # along with this program; if not, write to the Free Software
Chris@1 808 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 809 # 02111-1307, USA.
Chris@1 810
Chris@1 811 # serial 5
Chris@1 812
Chris@1 813 AC_PREREQ(2.52)
Chris@1 814
Chris@1 815 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
Chris@1 816 # -------------------------------------
Chris@1 817 # Define a conditional.
Chris@1 818 AC_DEFUN([AM_CONDITIONAL],
Chris@1 819 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
Chris@1 820 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
Chris@1 821 AC_SUBST([$1_TRUE])
Chris@1 822 AC_SUBST([$1_FALSE])
Chris@1 823 if $2; then
Chris@1 824 $1_TRUE=
Chris@1 825 $1_FALSE='#'
Chris@1 826 else
Chris@1 827 $1_TRUE='#'
Chris@1 828 $1_FALSE=
Chris@1 829 fi
Chris@1 830 AC_CONFIG_COMMANDS_PRE(
Chris@1 831 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
Chris@1 832 AC_MSG_ERROR([conditional "$1" was never defined.
Chris@1 833 Usually this means the macro was only invoked conditionally.])
Chris@1 834 fi])])
Chris@1 835
Chris@1 836 # Add --enable-maintainer-mode option to configure.
Chris@1 837 # From Jim Meyering
Chris@1 838
Chris@1 839 # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
Chris@1 840
Chris@1 841 # This program is free software; you can redistribute it and/or modify
Chris@1 842 # it under the terms of the GNU General Public License as published by
Chris@1 843 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 844 # any later version.
Chris@1 845
Chris@1 846 # This program is distributed in the hope that it will be useful,
Chris@1 847 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 848 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 849 # GNU General Public License for more details.
Chris@1 850
Chris@1 851 # You should have received a copy of the GNU General Public License
Chris@1 852 # along with this program; if not, write to the Free Software
Chris@1 853 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 854 # 02111-1307, USA.
Chris@1 855
Chris@1 856 # serial 2
Chris@1 857
Chris@1 858 AC_DEFUN([AM_MAINTAINER_MODE],
Chris@1 859 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
Chris@1 860 dnl maintainer-mode is disabled by default
Chris@1 861 AC_ARG_ENABLE(maintainer-mode,
Chris@1 862 [ --enable-maintainer-mode enable make rules and dependencies not useful
Chris@1 863 (and sometimes confusing) to the casual installer],
Chris@1 864 USE_MAINTAINER_MODE=$enableval,
Chris@1 865 USE_MAINTAINER_MODE=no)
Chris@1 866 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
Chris@1 867 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
Chris@1 868 MAINT=$MAINTAINER_MODE_TRUE
Chris@1 869 AC_SUBST(MAINT)dnl
Chris@1 870 ]
Chris@1 871 )
Chris@1 872
Chris@1 873 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
Chris@1 874
Chris@1 875 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@1 876
Chris@1 877 # serial 47 AC_PROG_LIBTOOL
Chris@1 878
Chris@1 879
Chris@1 880 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
Chris@1 881 # -----------------------------------------------------------
Chris@1 882 # If this macro is not defined by Autoconf, define it here.
Chris@1 883 m4_ifdef([AC_PROVIDE_IFELSE],
Chris@1 884 [],
Chris@1 885 [m4_define([AC_PROVIDE_IFELSE],
Chris@1 886 [m4_ifdef([AC_PROVIDE_$1],
Chris@1 887 [$2], [$3])])])
Chris@1 888
Chris@1 889
Chris@1 890 # AC_PROG_LIBTOOL
Chris@1 891 # ---------------
Chris@1 892 AC_DEFUN([AC_PROG_LIBTOOL],
Chris@1 893 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
Chris@1 894 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
Chris@1 895 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
Chris@1 896 AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@1 897 [AC_LIBTOOL_CXX],
Chris@1 898 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
Chris@1 899 ])])
Chris@1 900 dnl And a similar setup for Fortran 77 support
Chris@1 901 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@1 902 [AC_LIBTOOL_F77],
Chris@1 903 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
Chris@1 904 ])])
Chris@1 905
Chris@1 906 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
Chris@1 907 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
Chris@1 908 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
Chris@1 909 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@1 910 [AC_LIBTOOL_GCJ],
Chris@1 911 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@1 912 [AC_LIBTOOL_GCJ],
Chris@1 913 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
Chris@1 914 [AC_LIBTOOL_GCJ],
Chris@1 915 [ifdef([AC_PROG_GCJ],
Chris@1 916 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
Chris@1 917 ifdef([A][M_PROG_GCJ],
Chris@1 918 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
Chris@1 919 ifdef([LT_AC_PROG_GCJ],
Chris@1 920 [define([LT_AC_PROG_GCJ],
Chris@1 921 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
Chris@1 922 ])])# AC_PROG_LIBTOOL
Chris@1 923
Chris@1 924
Chris@1 925 # _AC_PROG_LIBTOOL
Chris@1 926 # ----------------
Chris@1 927 AC_DEFUN([_AC_PROG_LIBTOOL],
Chris@1 928 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
Chris@1 929 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
Chris@1 930 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
Chris@1 931 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
Chris@1 932
Chris@1 933 # This can be used to rebuild libtool when needed
Chris@1 934 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
Chris@1 935
Chris@1 936 # Always use our own libtool.
Chris@1 937 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@1 938 AC_SUBST(LIBTOOL)dnl
Chris@1 939
Chris@1 940 # Prevent multiple expansion
Chris@1 941 define([AC_PROG_LIBTOOL], [])
Chris@1 942 ])# _AC_PROG_LIBTOOL
Chris@1 943
Chris@1 944
Chris@1 945 # AC_LIBTOOL_SETUP
Chris@1 946 # ----------------
Chris@1 947 AC_DEFUN([AC_LIBTOOL_SETUP],
Chris@1 948 [AC_PREREQ(2.50)dnl
Chris@1 949 AC_REQUIRE([AC_ENABLE_SHARED])dnl
Chris@1 950 AC_REQUIRE([AC_ENABLE_STATIC])dnl
Chris@1 951 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
Chris@1 952 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@1 953 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@1 954 AC_REQUIRE([AC_PROG_CC])dnl
Chris@1 955 AC_REQUIRE([AC_PROG_LD])dnl
Chris@1 956 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
Chris@1 957 AC_REQUIRE([AC_PROG_NM])dnl
Chris@1 958
Chris@1 959 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@1 960 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
Chris@1 961 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
Chris@1 962 AC_REQUIRE([AC_OBJEXT])dnl
Chris@1 963 AC_REQUIRE([AC_EXEEXT])dnl
Chris@1 964 dnl
Chris@1 965
Chris@1 966 AC_LIBTOOL_SYS_MAX_CMD_LEN
Chris@1 967 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
Chris@1 968 AC_LIBTOOL_OBJDIR
Chris@1 969
Chris@1 970 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
Chris@1 971 _LT_AC_PROG_ECHO_BACKSLASH
Chris@1 972
Chris@1 973 case $host_os in
Chris@1 974 aix3*)
Chris@1 975 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@1 976 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@1 977 # vanish in a puff of smoke.
Chris@1 978 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@1 979 COLLECT_NAMES=
Chris@1 980 export COLLECT_NAMES
Chris@1 981 fi
Chris@1 982 ;;
Chris@1 983 esac
Chris@1 984
Chris@1 985 # Sed substitution that helps us do robust quoting. It backslashifies
Chris@1 986 # metacharacters that are still active within double-quoted strings.
Chris@1 987 Xsed='sed -e 1s/^X//'
Chris@1 988 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
Chris@1 989
Chris@1 990 # Same as above, but do not quote variable references.
Chris@1 991 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
Chris@1 992
Chris@1 993 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@1 994 # double_quote_subst'ed string.
Chris@1 995 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@1 996
Chris@1 997 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@1 998 no_glob_subst='s/\*/\\\*/g'
Chris@1 999
Chris@1 1000 # Constants:
Chris@1 1001 rm="rm -f"
Chris@1 1002
Chris@1 1003 # Global variables:
Chris@1 1004 default_ofile=libtool
Chris@1 1005 can_build_shared=yes
Chris@1 1006
Chris@1 1007 # All known linkers require a `.a' archive for static linking (except M$VC,
Chris@1 1008 # which needs '.lib').
Chris@1 1009 libext=a
Chris@1 1010 ltmain="$ac_aux_dir/ltmain.sh"
Chris@1 1011 ofile="$default_ofile"
Chris@1 1012 with_gnu_ld="$lt_cv_prog_gnu_ld"
Chris@1 1013
Chris@1 1014 AC_CHECK_TOOL(AR, ar, false)
Chris@1 1015 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@1 1016 AC_CHECK_TOOL(STRIP, strip, :)
Chris@1 1017
Chris@1 1018 old_CC="$CC"
Chris@1 1019 old_CFLAGS="$CFLAGS"
Chris@1 1020
Chris@1 1021 # Set sane defaults for various variables
Chris@1 1022 test -z "$AR" && AR=ar
Chris@1 1023 test -z "$AR_FLAGS" && AR_FLAGS=cru
Chris@1 1024 test -z "$AS" && AS=as
Chris@1 1025 test -z "$CC" && CC=cc
Chris@1 1026 test -z "$LTCC" && LTCC=$CC
Chris@1 1027 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@1 1028 test -z "$LD" && LD=ld
Chris@1 1029 test -z "$LN_S" && LN_S="ln -s"
Chris@1 1030 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@1 1031 test -z "$NM" && NM=nm
Chris@1 1032 test -z "$SED" && SED=sed
Chris@1 1033 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@1 1034 test -z "$RANLIB" && RANLIB=:
Chris@1 1035 test -z "$STRIP" && STRIP=:
Chris@1 1036 test -z "$ac_objext" && ac_objext=o
Chris@1 1037
Chris@1 1038 # Determine commands to create old-style static archives.
Chris@1 1039 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
Chris@1 1040 old_postinstall_cmds='chmod 644 $oldlib'
Chris@1 1041 old_postuninstall_cmds=
Chris@1 1042
Chris@1 1043 if test -n "$RANLIB"; then
Chris@1 1044 case $host_os in
Chris@1 1045 openbsd*)
Chris@1 1046 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
Chris@1 1047 ;;
Chris@1 1048 *)
Chris@1 1049 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
Chris@1 1050 ;;
Chris@1 1051 esac
Chris@1 1052 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
Chris@1 1053 fi
Chris@1 1054
Chris@1 1055 _LT_CC_BASENAME([$compiler])
Chris@1 1056
Chris@1 1057 # Only perform the check for file, if the check method requires it
Chris@1 1058 case $deplibs_check_method in
Chris@1 1059 file_magic*)
Chris@1 1060 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@1 1061 AC_PATH_MAGIC
Chris@1 1062 fi
Chris@1 1063 ;;
Chris@1 1064 esac
Chris@1 1065
Chris@1 1066 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
Chris@1 1067 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
Chris@1 1068 enable_win32_dll=yes, enable_win32_dll=no)
Chris@1 1069
Chris@1 1070 AC_ARG_ENABLE([libtool-lock],
Chris@1 1071 [AC_HELP_STRING([--disable-libtool-lock],
Chris@1 1072 [avoid locking (might break parallel builds)])])
Chris@1 1073 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
Chris@1 1074
Chris@1 1075 AC_ARG_WITH([pic],
Chris@1 1076 [AC_HELP_STRING([--with-pic],
Chris@1 1077 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
Chris@1 1078 [pic_mode="$withval"],
Chris@1 1079 [pic_mode=default])
Chris@1 1080 test -z "$pic_mode" && pic_mode=default
Chris@1 1081
Chris@1 1082 # Use C for the default configuration in the libtool script
Chris@1 1083 tagname=
Chris@1 1084 AC_LIBTOOL_LANG_C_CONFIG
Chris@1 1085 _LT_AC_TAGCONFIG
Chris@1 1086 ])# AC_LIBTOOL_SETUP
Chris@1 1087
Chris@1 1088
Chris@1 1089 # _LT_AC_SYS_COMPILER
Chris@1 1090 # -------------------
Chris@1 1091 AC_DEFUN([_LT_AC_SYS_COMPILER],
Chris@1 1092 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@1 1093
Chris@1 1094 # If no C compiler was specified, use CC.
Chris@1 1095 LTCC=${LTCC-"$CC"}
Chris@1 1096
Chris@1 1097 # Allow CC to be a program name with arguments.
Chris@1 1098 compiler=$CC
Chris@1 1099 ])# _LT_AC_SYS_COMPILER
Chris@1 1100
Chris@1 1101
Chris@1 1102 # _LT_CC_BASENAME(CC)
Chris@1 1103 # -------------------
Chris@1 1104 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@1 1105 AC_DEFUN([_LT_CC_BASENAME],
Chris@1 1106 [for cc_temp in $1""; do
Chris@1 1107 case $cc_temp in
Chris@1 1108 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@1 1109 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@1 1110 \-*) ;;
Chris@1 1111 *) break;;
Chris@1 1112 esac
Chris@1 1113 done
Chris@1 1114 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
Chris@1 1115 ])
Chris@1 1116
Chris@1 1117
Chris@1 1118 # _LT_COMPILER_BOILERPLATE
Chris@1 1119 # ------------------------
Chris@1 1120 # Check for compiler boilerplate output or warnings with
Chris@1 1121 # the simple compiler test code.
Chris@1 1122 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
Chris@1 1123 [ac_outfile=conftest.$ac_objext
Chris@1 1124 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@1 1125 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
Chris@1 1126 _lt_compiler_boilerplate=`cat conftest.err`
Chris@1 1127 $rm conftest*
Chris@1 1128 ])# _LT_COMPILER_BOILERPLATE
Chris@1 1129
Chris@1 1130
Chris@1 1131 # _LT_LINKER_BOILERPLATE
Chris@1 1132 # ----------------------
Chris@1 1133 # Check for linker boilerplate output or warnings with
Chris@1 1134 # the simple link test code.
Chris@1 1135 AC_DEFUN([_LT_LINKER_BOILERPLATE],
Chris@1 1136 [ac_outfile=conftest.$ac_objext
Chris@1 1137 printf "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@1 1138 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
Chris@1 1139 _lt_linker_boilerplate=`cat conftest.err`
Chris@1 1140 $rm conftest*
Chris@1 1141 ])# _LT_LINKER_BOILERPLATE
Chris@1 1142
Chris@1 1143
Chris@1 1144 # _LT_AC_SYS_LIBPATH_AIX
Chris@1 1145 # ----------------------
Chris@1 1146 # Links a minimal program and checks the executable
Chris@1 1147 # for the system default hardcoded library path. In most cases,
Chris@1 1148 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@1 1149 # the location of the communication and MPI libs are included too.
Chris@1 1150 # If we don't find anything, use the default library path according
Chris@1 1151 # to the aix ld manual.
Chris@1 1152 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
Chris@1 1153 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
Chris@1 1154 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
Chris@1 1155 }'`
Chris@1 1156 # Check for a 64-bit object if we didn't find anything.
Chris@1 1157 if 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; }
Chris@1 1158 }'`; fi],[])
Chris@1 1159 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
Chris@1 1160 ])# _LT_AC_SYS_LIBPATH_AIX
Chris@1 1161
Chris@1 1162
Chris@1 1163 # _LT_AC_SHELL_INIT(ARG)
Chris@1 1164 # ----------------------
Chris@1 1165 AC_DEFUN([_LT_AC_SHELL_INIT],
Chris@1 1166 [ifdef([AC_DIVERSION_NOTICE],
Chris@1 1167 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
Chris@1 1168 [AC_DIVERT_PUSH(NOTICE)])
Chris@1 1169 $1
Chris@1 1170 AC_DIVERT_POP
Chris@1 1171 ])# _LT_AC_SHELL_INIT
Chris@1 1172
Chris@1 1173
Chris@1 1174 # _LT_AC_PROG_ECHO_BACKSLASH
Chris@1 1175 # --------------------------
Chris@1 1176 # Add some code to the start of the generated configure script which
Chris@1 1177 # will find an echo command which doesn't interpret backslashes.
Chris@1 1178 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
Chris@1 1179 [_LT_AC_SHELL_INIT([
Chris@1 1180 # Check that we are running under the correct shell.
Chris@1 1181 SHELL=${CONFIG_SHELL-/bin/sh}
Chris@1 1182
Chris@1 1183 case X$ECHO in
Chris@1 1184 X*--fallback-echo)
Chris@1 1185 # Remove one level of quotation (which was required for Make).
Chris@1 1186 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
Chris@1 1187 ;;
Chris@1 1188 esac
Chris@1 1189
Chris@1 1190 echo=${ECHO-echo}
Chris@1 1191 if test "X[$]1" = X--no-reexec; then
Chris@1 1192 # Discard the --no-reexec flag, and continue.
Chris@1 1193 shift
Chris@1 1194 elif test "X[$]1" = X--fallback-echo; then
Chris@1 1195 # Avoid inline document here, it may be left over
Chris@1 1196 :
Chris@1 1197 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
Chris@1 1198 # Yippee, $echo works!
Chris@1 1199 :
Chris@1 1200 else
Chris@1 1201 # Restart under the correct shell.
Chris@1 1202 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
Chris@1 1203 fi
Chris@1 1204
Chris@1 1205 if test "X[$]1" = X--fallback-echo; then
Chris@1 1206 # used as fallback echo
Chris@1 1207 shift
Chris@1 1208 cat <<EOF
Chris@1 1209 [$]*
Chris@1 1210 EOF
Chris@1 1211 exit 0
Chris@1 1212 fi
Chris@1 1213
Chris@1 1214 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@1 1215 # if CDPATH is set.
Chris@1 1216 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@1 1217
Chris@1 1218 if test -z "$ECHO"; then
Chris@1 1219 if test "X${echo_test_string+set}" != Xset; then
Chris@1 1220 # find a string as large as possible, as long as the shell can cope with it
Chris@1 1221 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
Chris@1 1222 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
Chris@1 1223 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
Chris@1 1224 echo_test_string="`eval $cmd`" &&
Chris@1 1225 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
Chris@1 1226 then
Chris@1 1227 break
Chris@1 1228 fi
Chris@1 1229 done
Chris@1 1230 fi
Chris@1 1231
Chris@1 1232 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
Chris@1 1233 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
Chris@1 1234 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1235 :
Chris@1 1236 else
Chris@1 1237 # The Solaris, AIX, and Digital Unix default echo programs unquote
Chris@1 1238 # backslashes. This makes it impossible to quote backslashes using
Chris@1 1239 # echo "$something" | sed 's/\\/\\\\/g'
Chris@1 1240 #
Chris@1 1241 # So, first we look for a working echo in the user's PATH.
Chris@1 1242
Chris@1 1243 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@1 1244 for dir in $PATH /usr/ucb; do
Chris@1 1245 IFS="$lt_save_ifs"
Chris@1 1246 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
Chris@1 1247 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
Chris@1 1248 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
Chris@1 1249 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1250 echo="$dir/echo"
Chris@1 1251 break
Chris@1 1252 fi
Chris@1 1253 done
Chris@1 1254 IFS="$lt_save_ifs"
Chris@1 1255
Chris@1 1256 if test "X$echo" = Xecho; then
Chris@1 1257 # We didn't find a better echo, so look for alternatives.
Chris@1 1258 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
Chris@1 1259 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
Chris@1 1260 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1261 # This shell has a builtin print -r that does the trick.
Chris@1 1262 echo='print -r'
Chris@1 1263 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
Chris@1 1264 test "X$CONFIG_SHELL" != X/bin/ksh; then
Chris@1 1265 # If we have ksh, try running configure again with it.
Chris@1 1266 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
Chris@1 1267 export ORIGINAL_CONFIG_SHELL
Chris@1 1268 CONFIG_SHELL=/bin/ksh
Chris@1 1269 export CONFIG_SHELL
Chris@1 1270 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
Chris@1 1271 else
Chris@1 1272 # Try using printf.
Chris@1 1273 echo='printf %s\n'
Chris@1 1274 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
Chris@1 1275 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
Chris@1 1276 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1277 # Cool, printf works
Chris@1 1278 :
Chris@1 1279 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
Chris@1 1280 test "X$echo_testing_string" = 'X\t' &&
Chris@1 1281 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
Chris@1 1282 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1283 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
Chris@1 1284 export CONFIG_SHELL
Chris@1 1285 SHELL="$CONFIG_SHELL"
Chris@1 1286 export SHELL
Chris@1 1287 echo="$CONFIG_SHELL [$]0 --fallback-echo"
Chris@1 1288 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
Chris@1 1289 test "X$echo_testing_string" = 'X\t' &&
Chris@1 1290 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
Chris@1 1291 test "X$echo_testing_string" = "X$echo_test_string"; then
Chris@1 1292 echo="$CONFIG_SHELL [$]0 --fallback-echo"
Chris@1 1293 else
Chris@1 1294 # maybe with a smaller string...
Chris@1 1295 prev=:
Chris@1 1296
Chris@1 1297 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
Chris@1 1298 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
Chris@1 1299 then
Chris@1 1300 break
Chris@1 1301 fi
Chris@1 1302 prev="$cmd"
Chris@1 1303 done
Chris@1 1304
Chris@1 1305 if test "$prev" != 'sed 50q "[$]0"'; then
Chris@1 1306 echo_test_string=`eval $prev`
Chris@1 1307 export echo_test_string
Chris@1 1308 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
Chris@1 1309 else
Chris@1 1310 # Oops. We lost completely, so just stick with echo.
Chris@1 1311 echo=echo
Chris@1 1312 fi
Chris@1 1313 fi
Chris@1 1314 fi
Chris@1 1315 fi
Chris@1 1316 fi
Chris@1 1317 fi
Chris@1 1318
Chris@1 1319 # Copy echo and quote the copy suitably for passing to libtool from
Chris@1 1320 # the Makefile, instead of quoting the original, which is used later.
Chris@1 1321 ECHO=$echo
Chris@1 1322 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
Chris@1 1323 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
Chris@1 1324 fi
Chris@1 1325
Chris@1 1326 AC_SUBST(ECHO)
Chris@1 1327 ])])# _LT_AC_PROG_ECHO_BACKSLASH
Chris@1 1328
Chris@1 1329
Chris@1 1330 # _LT_AC_LOCK
Chris@1 1331 # -----------
Chris@1 1332 AC_DEFUN([_LT_AC_LOCK],
Chris@1 1333 [AC_ARG_ENABLE([libtool-lock],
Chris@1 1334 [AC_HELP_STRING([--disable-libtool-lock],
Chris@1 1335 [avoid locking (might break parallel builds)])])
Chris@1 1336 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
Chris@1 1337
Chris@1 1338 # Some flags need to be propagated to the compiler or linker for good
Chris@1 1339 # libtool support.
Chris@1 1340 case $host in
Chris@1 1341 ia64-*-hpux*)
Chris@1 1342 # Find out which ABI we are using.
Chris@1 1343 echo 'int i;' > conftest.$ac_ext
Chris@1 1344 if AC_TRY_EVAL(ac_compile); then
Chris@1 1345 case `/usr/bin/file conftest.$ac_objext` in
Chris@1 1346 *ELF-32*)
Chris@1 1347 HPUX_IA64_MODE="32"
Chris@1 1348 ;;
Chris@1 1349 *ELF-64*)
Chris@1 1350 HPUX_IA64_MODE="64"
Chris@1 1351 ;;
Chris@1 1352 esac
Chris@1 1353 fi
Chris@1 1354 rm -rf conftest*
Chris@1 1355 ;;
Chris@1 1356 *-*-irix6*)
Chris@1 1357 # Find out which ABI we are using.
Chris@1 1358 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
Chris@1 1359 if AC_TRY_EVAL(ac_compile); then
Chris@1 1360 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@1 1361 case `/usr/bin/file conftest.$ac_objext` in
Chris@1 1362 *32-bit*)
Chris@1 1363 LD="${LD-ld} -melf32bsmip"
Chris@1 1364 ;;
Chris@1 1365 *N32*)
Chris@1 1366 LD="${LD-ld} -melf32bmipn32"
Chris@1 1367 ;;
Chris@1 1368 *64-bit*)
Chris@1 1369 LD="${LD-ld} -melf64bmip"
Chris@1 1370 ;;
Chris@1 1371 esac
Chris@1 1372 else
Chris@1 1373 case `/usr/bin/file conftest.$ac_objext` in
Chris@1 1374 *32-bit*)
Chris@1 1375 LD="${LD-ld} -32"
Chris@1 1376 ;;
Chris@1 1377 *N32*)
Chris@1 1378 LD="${LD-ld} -n32"
Chris@1 1379 ;;
Chris@1 1380 *64-bit*)
Chris@1 1381 LD="${LD-ld} -64"
Chris@1 1382 ;;
Chris@1 1383 esac
Chris@1 1384 fi
Chris@1 1385 fi
Chris@1 1386 rm -rf conftest*
Chris@1 1387 ;;
Chris@1 1388
Chris@1 1389 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
Chris@1 1390 # Find out which ABI we are using.
Chris@1 1391 echo 'int i;' > conftest.$ac_ext
Chris@1 1392 if AC_TRY_EVAL(ac_compile); then
Chris@1 1393 case "`/usr/bin/file conftest.o`" in
Chris@1 1394 *32-bit*)
Chris@1 1395 case $host in
Chris@1 1396 x86_64-*linux*)
Chris@1 1397 LD="${LD-ld} -m elf_i386"
Chris@1 1398 ;;
Chris@1 1399 ppc64-*linux*|powerpc64-*linux*)
Chris@1 1400 LD="${LD-ld} -m elf32ppclinux"
Chris@1 1401 ;;
Chris@1 1402 s390x-*linux*)
Chris@1 1403 LD="${LD-ld} -m elf_s390"
Chris@1 1404 ;;
Chris@1 1405 sparc64-*linux*)
Chris@1 1406 LD="${LD-ld} -m elf32_sparc"
Chris@1 1407 ;;
Chris@1 1408 esac
Chris@1 1409 ;;
Chris@1 1410 *64-bit*)
Chris@1 1411 case $host in
Chris@1 1412 x86_64-*linux*)
Chris@1 1413 LD="${LD-ld} -m elf_x86_64"
Chris@1 1414 ;;
Chris@1 1415 ppc*-*linux*|powerpc*-*linux*)
Chris@1 1416 LD="${LD-ld} -m elf64ppc"
Chris@1 1417 ;;
Chris@1 1418 s390*-*linux*)
Chris@1 1419 LD="${LD-ld} -m elf64_s390"
Chris@1 1420 ;;
Chris@1 1421 sparc*-*linux*)
Chris@1 1422 LD="${LD-ld} -m elf64_sparc"
Chris@1 1423 ;;
Chris@1 1424 esac
Chris@1 1425 ;;
Chris@1 1426 esac
Chris@1 1427 fi
Chris@1 1428 rm -rf conftest*
Chris@1 1429 ;;
Chris@1 1430
Chris@1 1431 *-*-sco3.2v5*)
Chris@1 1432 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@1 1433 SAVE_CFLAGS="$CFLAGS"
Chris@1 1434 CFLAGS="$CFLAGS -belf"
Chris@1 1435 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@1 1436 [AC_LANG_PUSH(C)
Chris@1 1437 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@1 1438 AC_LANG_POP])
Chris@1 1439 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
Chris@1 1440 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@1 1441 CFLAGS="$SAVE_CFLAGS"
Chris@1 1442 fi
Chris@1 1443 ;;
Chris@1 1444 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
Chris@1 1445 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
Chris@1 1446 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@1 1447 AC_CHECK_TOOL(AS, as, false)
Chris@1 1448 AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@1 1449 ;;
Chris@1 1450 ])
Chris@1 1451 esac
Chris@1 1452
Chris@1 1453 need_locks="$enable_libtool_lock"
Chris@1 1454
Chris@1 1455 ])# _LT_AC_LOCK
Chris@1 1456
Chris@1 1457
Chris@1 1458 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@1 1459 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@1 1460 # ----------------------------------------------------------------
Chris@1 1461 # Check whether the given compiler option works
Chris@1 1462 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
Chris@1 1463 [AC_REQUIRE([LT_AC_PROG_SED])
Chris@1 1464 AC_CACHE_CHECK([$1], [$2],
Chris@1 1465 [$2=no
Chris@1 1466 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@1 1467 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@1 1468 lt_compiler_flag="$3"
Chris@1 1469 # Insert the option either (1) after the last *FLAGS variable, or
Chris@1 1470 # (2) before a word containing "conftest.", or (3) at the end.
Chris@1 1471 # Note that $ac_compile itself does not contain backslashes and begins
Chris@1 1472 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@1 1473 # The option is referenced via a variable to avoid confusing sed.
Chris@1 1474 lt_compile=`echo "$ac_compile" | $SED \
Chris@1 1475 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
Chris@1 1476 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@1 1477 -e 's:$: $lt_compiler_flag:'`
Chris@1 1478 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@1 1479 (eval "$lt_compile" 2>conftest.err)
Chris@1 1480 ac_status=$?
Chris@1 1481 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@1 1482 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@1 1483 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@1 1484 # The compiler can only warn and ignore the option if not recognized
Chris@1 1485 # So say no if there are warnings other than the usual output.
Chris@1 1486 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
Chris@1 1487 $SED '/^$/d' conftest.err >conftest.er2
Chris@1 1488 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
Chris@1 1489 $2=yes
Chris@1 1490 fi
Chris@1 1491 fi
Chris@1 1492 $rm conftest*
Chris@1 1493 ])
Chris@1 1494
Chris@1 1495 if test x"[$]$2" = xyes; then
Chris@1 1496 ifelse([$5], , :, [$5])
Chris@1 1497 else
Chris@1 1498 ifelse([$6], , :, [$6])
Chris@1 1499 fi
Chris@1 1500 ])# AC_LIBTOOL_COMPILER_OPTION
Chris@1 1501
Chris@1 1502
Chris@1 1503 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@1 1504 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@1 1505 # ------------------------------------------------------------
Chris@1 1506 # Check whether the given compiler option works
Chris@1 1507 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
Chris@1 1508 [AC_CACHE_CHECK([$1], [$2],
Chris@1 1509 [$2=no
Chris@1 1510 save_LDFLAGS="$LDFLAGS"
Chris@1 1511 LDFLAGS="$LDFLAGS $3"
Chris@1 1512 printf "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@1 1513 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@1 1514 # The compiler can only warn and ignore the option if not recognized
Chris@1 1515 # So say no if there are warnings
Chris@1 1516 if test -s conftest.err; then
Chris@1 1517 # Append any errors to the config.log.
Chris@1 1518 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@1 1519 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
Chris@1 1520 $SED '/^$/d' conftest.err >conftest.er2
Chris@1 1521 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@1 1522 $2=yes
Chris@1 1523 fi
Chris@1 1524 else
Chris@1 1525 $2=yes
Chris@1 1526 fi
Chris@1 1527 fi
Chris@1 1528 $rm conftest*
Chris@1 1529 LDFLAGS="$save_LDFLAGS"
Chris@1 1530 ])
Chris@1 1531
Chris@1 1532 if test x"[$]$2" = xyes; then
Chris@1 1533 ifelse([$4], , :, [$4])
Chris@1 1534 else
Chris@1 1535 ifelse([$5], , :, [$5])
Chris@1 1536 fi
Chris@1 1537 ])# AC_LIBTOOL_LINKER_OPTION
Chris@1 1538
Chris@1 1539
Chris@1 1540 # AC_LIBTOOL_SYS_MAX_CMD_LEN
Chris@1 1541 # --------------------------
Chris@1 1542 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
Chris@1 1543 [# find the maximum length of command line arguments
Chris@1 1544 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@1 1545 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@1 1546 i=0
Chris@1 1547 teststring="ABCD"
Chris@1 1548
Chris@1 1549 case $build_os in
Chris@1 1550 msdosdjgpp*)
Chris@1 1551 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@1 1552 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@1 1553 # during glob expansion). Even if it were fixed, the result of this
Chris@1 1554 # check would be larger than it should be.
Chris@1 1555 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@1 1556 ;;
Chris@1 1557
Chris@1 1558 gnu*)
Chris@1 1559 # Under GNU Hurd, this test is not required because there is
Chris@1 1560 # no limit to the length of command line arguments.
Chris@1 1561 # Libtool will interpret -1 as no limit whatsoever
Chris@1 1562 lt_cv_sys_max_cmd_len=-1;
Chris@1 1563 ;;
Chris@1 1564
Chris@1 1565 cygwin* | mingw*)
Chris@1 1566 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@1 1567 # about 5 minutes as the teststring grows exponentially.
Chris@1 1568 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@1 1569 # you end up with a "frozen" computer, even though with patience
Chris@1 1570 # the test eventually succeeds (with a max line length of 256k).
Chris@1 1571 # Instead, let's just punt: use the minimum linelength reported by
Chris@1 1572 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@1 1573 lt_cv_sys_max_cmd_len=8192;
Chris@1 1574 ;;
Chris@1 1575
Chris@1 1576 amigaos*)
Chris@1 1577 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@1 1578 # So we just punt and use a minimum line length of 8192.
Chris@1 1579 lt_cv_sys_max_cmd_len=8192;
Chris@1 1580 ;;
Chris@1 1581
Chris@1 1582 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
Chris@1 1583 # This has been around since 386BSD, at least. Likely further.
Chris@1 1584 if test -x /sbin/sysctl; then
Chris@1 1585 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@1 1586 elif test -x /usr/sbin/sysctl; then
Chris@1 1587 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@1 1588 else
Chris@1 1589 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
Chris@1 1590 fi
Chris@1 1591 # And add a safety zone
Chris@1 1592 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@1 1593 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@1 1594 ;;
Chris@1 1595 osf*)
Chris@1 1596 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@1 1597 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@1 1598 # nice to cause kernel panics so lets avoid the loop below.
Chris@1 1599 # First set a reasonable default.
Chris@1 1600 lt_cv_sys_max_cmd_len=16384
Chris@1 1601 #
Chris@1 1602 if test -x /sbin/sysconfig; then
Chris@1 1603 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@1 1604 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@1 1605 esac
Chris@1 1606 fi
Chris@1 1607 ;;
Chris@1 1608 *)
Chris@1 1609 # If test is not a shell built-in, we'll probably end up computing a
Chris@1 1610 # maximum length that is only half of the actual maximum length, but
Chris@1 1611 # we can't tell.
Chris@1 1612 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@1 1613 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
Chris@1 1614 = "XX$teststring") >/dev/null 2>&1 &&
Chris@1 1615 new_result=`expr "X$teststring" : ".*" 2>&1` &&
Chris@1 1616 lt_cv_sys_max_cmd_len=$new_result &&
Chris@1 1617 test $i != 17 # 1/2 MB should be enough
Chris@1 1618 do
Chris@1 1619 i=`expr $i + 1`
Chris@1 1620 teststring=$teststring$teststring
Chris@1 1621 done
Chris@1 1622 teststring=
Chris@1 1623 # Add a significant safety factor because C++ compilers can tack on massive
Chris@1 1624 # amounts of additional arguments before passing them to the linker.
Chris@1 1625 # It appears as though 1/2 is a usable value.
Chris@1 1626 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@1 1627 ;;
Chris@1 1628 esac
Chris@1 1629 ])
Chris@1 1630 if test -n $lt_cv_sys_max_cmd_len ; then
Chris@1 1631 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@1 1632 else
Chris@1 1633 AC_MSG_RESULT(none)
Chris@1 1634 fi
Chris@1 1635 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
Chris@1 1636
Chris@1 1637
Chris@1 1638 # _LT_AC_CHECK_DLFCN
Chris@1 1639 # --------------------
Chris@1 1640 AC_DEFUN([_LT_AC_CHECK_DLFCN],
Chris@1 1641 [AC_CHECK_HEADERS(dlfcn.h)dnl
Chris@1 1642 ])# _LT_AC_CHECK_DLFCN
Chris@1 1643
Chris@1 1644
Chris@1 1645 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@1 1646 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@1 1647 # ------------------------------------------------------------------
Chris@1 1648 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
Chris@1 1649 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
Chris@1 1650 if test "$cross_compiling" = yes; then :
Chris@1 1651 [$4]
Chris@1 1652 else
Chris@1 1653 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@1 1654 lt_status=$lt_dlunknown
Chris@1 1655 cat > conftest.$ac_ext <<EOF
Chris@1 1656 [#line __oline__ "configure"
Chris@1 1657 #include "confdefs.h"
Chris@1 1658
Chris@1 1659 #if HAVE_DLFCN_H
Chris@1 1660 #include <dlfcn.h>
Chris@1 1661 #endif
Chris@1 1662
Chris@1 1663 #include <stdio.h>
Chris@1 1664
Chris@1 1665 #ifdef RTLD_GLOBAL
Chris@1 1666 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@1 1667 #else
Chris@1 1668 # ifdef DL_GLOBAL
Chris@1 1669 # define LT_DLGLOBAL DL_GLOBAL
Chris@1 1670 # else
Chris@1 1671 # define LT_DLGLOBAL 0
Chris@1 1672 # endif
Chris@1 1673 #endif
Chris@1 1674
Chris@1 1675 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@1 1676 find out it does not work in some platform. */
Chris@1 1677 #ifndef LT_DLLAZY_OR_NOW
Chris@1 1678 # ifdef RTLD_LAZY
Chris@1 1679 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@1 1680 # else
Chris@1 1681 # ifdef DL_LAZY
Chris@1 1682 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@1 1683 # else
Chris@1 1684 # ifdef RTLD_NOW
Chris@1 1685 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@1 1686 # else
Chris@1 1687 # ifdef DL_NOW
Chris@1 1688 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@1 1689 # else
Chris@1 1690 # define LT_DLLAZY_OR_NOW 0
Chris@1 1691 # endif
Chris@1 1692 # endif
Chris@1 1693 # endif
Chris@1 1694 # endif
Chris@1 1695 #endif
Chris@1 1696
Chris@1 1697 #ifdef __cplusplus
Chris@1 1698 extern "C" void exit (int);
Chris@1 1699 #endif
Chris@1 1700
Chris@1 1701 void fnord() { int i=42;}
Chris@1 1702 int main ()
Chris@1 1703 {
Chris@1 1704 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@1 1705 int status = $lt_dlunknown;
Chris@1 1706
Chris@1 1707 if (self)
Chris@1 1708 {
Chris@1 1709 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@1 1710 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@1 1711 /* dlclose (self); */
Chris@1 1712 }
Chris@1 1713
Chris@1 1714 exit (status);
Chris@1 1715 }]
Chris@1 1716 EOF
Chris@1 1717 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
Chris@1 1718 (./conftest; exit; ) 2>/dev/null
Chris@1 1719 lt_status=$?
Chris@1 1720 case x$lt_status in
Chris@1 1721 x$lt_dlno_uscore) $1 ;;
Chris@1 1722 x$lt_dlneed_uscore) $2 ;;
Chris@1 1723 x$lt_unknown|x*) $3 ;;
Chris@1 1724 esac
Chris@1 1725 else :
Chris@1 1726 # compilation failed
Chris@1 1727 $3
Chris@1 1728 fi
Chris@1 1729 fi
Chris@1 1730 rm -fr conftest*
Chris@1 1731 ])# _LT_AC_TRY_DLOPEN_SELF
Chris@1 1732
Chris@1 1733
Chris@1 1734 # AC_LIBTOOL_DLOPEN_SELF
Chris@1 1735 # -------------------
Chris@1 1736 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
Chris@1 1737 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
Chris@1 1738 if test "x$enable_dlopen" != xyes; then
Chris@1 1739 enable_dlopen=unknown
Chris@1 1740 enable_dlopen_self=unknown
Chris@1 1741 enable_dlopen_self_static=unknown
Chris@1 1742 else
Chris@1 1743 lt_cv_dlopen=no
Chris@1 1744 lt_cv_dlopen_libs=
Chris@1 1745
Chris@1 1746 case $host_os in
Chris@1 1747 beos*)
Chris@1 1748 lt_cv_dlopen="load_add_on"
Chris@1 1749 lt_cv_dlopen_libs=
Chris@1 1750 lt_cv_dlopen_self=yes
Chris@1 1751 ;;
Chris@1 1752
Chris@1 1753 mingw* | pw32*)
Chris@1 1754 lt_cv_dlopen="LoadLibrary"
Chris@1 1755 lt_cv_dlopen_libs=
Chris@1 1756 ;;
Chris@1 1757
Chris@1 1758 cygwin*)
Chris@1 1759 lt_cv_dlopen="dlopen"
Chris@1 1760 lt_cv_dlopen_libs=
Chris@1 1761 ;;
Chris@1 1762
Chris@1 1763 darwin*)
Chris@1 1764 # if libdl is installed we need to link against it
Chris@1 1765 AC_CHECK_LIB([dl], [dlopen],
Chris@1 1766 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
Chris@1 1767 lt_cv_dlopen="dyld"
Chris@1 1768 lt_cv_dlopen_libs=
Chris@1 1769 lt_cv_dlopen_self=yes
Chris@1 1770 ])
Chris@1 1771 ;;
Chris@1 1772
Chris@1 1773 *)
Chris@1 1774 AC_CHECK_FUNC([shl_load],
Chris@1 1775 [lt_cv_dlopen="shl_load"],
Chris@1 1776 [AC_CHECK_LIB([dld], [shl_load],
Chris@1 1777 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
Chris@1 1778 [AC_CHECK_FUNC([dlopen],
Chris@1 1779 [lt_cv_dlopen="dlopen"],
Chris@1 1780 [AC_CHECK_LIB([dl], [dlopen],
Chris@1 1781 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
Chris@1 1782 [AC_CHECK_LIB([svld], [dlopen],
Chris@1 1783 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
Chris@1 1784 [AC_CHECK_LIB([dld], [dld_link],
Chris@1 1785 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
Chris@1 1786 ])
Chris@1 1787 ])
Chris@1 1788 ])
Chris@1 1789 ])
Chris@1 1790 ])
Chris@1 1791 ;;
Chris@1 1792 esac
Chris@1 1793
Chris@1 1794 if test "x$lt_cv_dlopen" != xno; then
Chris@1 1795 enable_dlopen=yes
Chris@1 1796 else
Chris@1 1797 enable_dlopen=no
Chris@1 1798 fi
Chris@1 1799
Chris@1 1800 case $lt_cv_dlopen in
Chris@1 1801 dlopen)
Chris@1 1802 save_CPPFLAGS="$CPPFLAGS"
Chris@1 1803 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@1 1804
Chris@1 1805 save_LDFLAGS="$LDFLAGS"
Chris@1 1806 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@1 1807
Chris@1 1808 save_LIBS="$LIBS"
Chris@1 1809 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@1 1810
Chris@1 1811 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@1 1812 lt_cv_dlopen_self, [dnl
Chris@1 1813 _LT_AC_TRY_DLOPEN_SELF(
Chris@1 1814 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@1 1815 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@1 1816 ])
Chris@1 1817
Chris@1 1818 if test "x$lt_cv_dlopen_self" = xyes; then
Chris@1 1819 LDFLAGS="$LDFLAGS $link_static_flag"
Chris@1 1820 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@1 1821 lt_cv_dlopen_self_static, [dnl
Chris@1 1822 _LT_AC_TRY_DLOPEN_SELF(
Chris@1 1823 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@1 1824 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@1 1825 ])
Chris@1 1826 fi
Chris@1 1827
Chris@1 1828 CPPFLAGS="$save_CPPFLAGS"
Chris@1 1829 LDFLAGS="$save_LDFLAGS"
Chris@1 1830 LIBS="$save_LIBS"
Chris@1 1831 ;;
Chris@1 1832 esac
Chris@1 1833
Chris@1 1834 case $lt_cv_dlopen_self in
Chris@1 1835 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@1 1836 *) enable_dlopen_self=unknown ;;
Chris@1 1837 esac
Chris@1 1838
Chris@1 1839 case $lt_cv_dlopen_self_static in
Chris@1 1840 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@1 1841 *) enable_dlopen_self_static=unknown ;;
Chris@1 1842 esac
Chris@1 1843 fi
Chris@1 1844 ])# AC_LIBTOOL_DLOPEN_SELF
Chris@1 1845
Chris@1 1846
Chris@1 1847 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
Chris@1 1848 # ---------------------------------
Chris@1 1849 # Check to see if options -c and -o are simultaneously supported by compiler
Chris@1 1850 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
Chris@1 1851 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
Chris@1 1852 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@1 1853 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@1 1854 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@1 1855 $rm -r conftest 2>/dev/null
Chris@1 1856 mkdir conftest
Chris@1 1857 cd conftest
Chris@1 1858 mkdir out
Chris@1 1859 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@1 1860
Chris@1 1861 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@1 1862 # Insert the option either (1) after the last *FLAGS variable, or
Chris@1 1863 # (2) before a word containing "conftest.", or (3) at the end.
Chris@1 1864 # Note that $ac_compile itself does not contain backslashes and begins
Chris@1 1865 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@1 1866 lt_compile=`echo "$ac_compile" | $SED \
Chris@1 1867 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
Chris@1 1868 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@1 1869 -e 's:$: $lt_compiler_flag:'`
Chris@1 1870 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@1 1871 (eval "$lt_compile" 2>out/conftest.err)
Chris@1 1872 ac_status=$?
Chris@1 1873 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@1 1874 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@1 1875 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@1 1876 then
Chris@1 1877 # The compiler can only warn and ignore the option if not recognized
Chris@1 1878 # So say no if there are warnings
Chris@1 1879 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
Chris@1 1880 $SED '/^$/d' out/conftest.err >out/conftest.er2
Chris@1 1881 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@1 1882 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@1 1883 fi
Chris@1 1884 fi
Chris@1 1885 chmod u+w .
Chris@1 1886 $rm conftest*
Chris@1 1887 # SGI C++ compiler will create directory out/ii_files/ for
Chris@1 1888 # template instantiation
Chris@1 1889 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
Chris@1 1890 $rm out/* && rmdir out
Chris@1 1891 cd ..
Chris@1 1892 rmdir conftest
Chris@1 1893 $rm conftest*
Chris@1 1894 ])
Chris@1 1895 ])# AC_LIBTOOL_PROG_CC_C_O
Chris@1 1896
Chris@1 1897
Chris@1 1898 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
Chris@1 1899 # -----------------------------------------
Chris@1 1900 # Check to see if we can do hard links to lock some files if needed
Chris@1 1901 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
Chris@1 1902 [AC_REQUIRE([_LT_AC_LOCK])dnl
Chris@1 1903
Chris@1 1904 hard_links="nottested"
Chris@1 1905 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
Chris@1 1906 # do not overwrite the value of need_locks provided by the user
Chris@1 1907 AC_MSG_CHECKING([if we can lock with hard links])
Chris@1 1908 hard_links=yes
Chris@1 1909 $rm conftest*
Chris@1 1910 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@1 1911 touch conftest.a
Chris@1 1912 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@1 1913 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@1 1914 AC_MSG_RESULT([$hard_links])
Chris@1 1915 if test "$hard_links" = no; then
Chris@1 1916 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
Chris@1 1917 need_locks=warn
Chris@1 1918 fi
Chris@1 1919 else
Chris@1 1920 need_locks=no
Chris@1 1921 fi
Chris@1 1922 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
Chris@1 1923
Chris@1 1924
Chris@1 1925 # AC_LIBTOOL_OBJDIR
Chris@1 1926 # -----------------
Chris@1 1927 AC_DEFUN([AC_LIBTOOL_OBJDIR],
Chris@1 1928 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@1 1929 [rm -f .libs 2>/dev/null
Chris@1 1930 mkdir .libs 2>/dev/null
Chris@1 1931 if test -d .libs; then
Chris@1 1932 lt_cv_objdir=.libs
Chris@1 1933 else
Chris@1 1934 # MS-DOS does not allow filenames that begin with a dot.
Chris@1 1935 lt_cv_objdir=_libs
Chris@1 1936 fi
Chris@1 1937 rmdir .libs 2>/dev/null])
Chris@1 1938 objdir=$lt_cv_objdir
Chris@1 1939 ])# AC_LIBTOOL_OBJDIR
Chris@1 1940
Chris@1 1941
Chris@1 1942 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
Chris@1 1943 # ----------------------------------------------
Chris@1 1944 # Check hardcoding attributes.
Chris@1 1945 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
Chris@1 1946 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@1 1947 _LT_AC_TAGVAR(hardcode_action, $1)=
Chris@1 1948 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
Chris@1 1949 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
Chris@1 1950 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
Chris@1 1951
Chris@1 1952 # We can hardcode non-existant directories.
Chris@1 1953 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
Chris@1 1954 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@1 1955 # have to relink, otherwise we might link with an installed library
Chris@1 1956 # when we should be linking with a yet-to-be-installed one
Chris@1 1957 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
Chris@1 1958 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
Chris@1 1959 # Linking always hardcodes the temporary library directory.
Chris@1 1960 _LT_AC_TAGVAR(hardcode_action, $1)=relink
Chris@1 1961 else
Chris@1 1962 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@1 1963 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
Chris@1 1964 fi
Chris@1 1965 else
Chris@1 1966 # We cannot hardcode anything, or else we can only hardcode existing
Chris@1 1967 # directories.
Chris@1 1968 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
Chris@1 1969 fi
Chris@1 1970 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
Chris@1 1971
Chris@1 1972 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
Chris@1 1973 # Fast installation is not supported
Chris@1 1974 enable_fast_install=no
Chris@1 1975 elif test "$shlibpath_overrides_runpath" = yes ||
Chris@1 1976 test "$enable_shared" = no; then
Chris@1 1977 # Fast installation is not necessary
Chris@1 1978 enable_fast_install=needless
Chris@1 1979 fi
Chris@1 1980 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
Chris@1 1981
Chris@1 1982
Chris@1 1983 # AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 1984 # ------------------------
Chris@1 1985 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
Chris@1 1986 [striplib=
Chris@1 1987 old_striplib=
Chris@1 1988 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@1 1989 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
Chris@1 1990 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@1 1991 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@1 1992 AC_MSG_RESULT([yes])
Chris@1 1993 else
Chris@1 1994 # FIXME - insert some real tests, host_os isn't really good enough
Chris@1 1995 case $host_os in
Chris@1 1996 darwin*)
Chris@1 1997 if test -n "$STRIP" ; then
Chris@1 1998 striplib="$STRIP -x"
Chris@1 1999 AC_MSG_RESULT([yes])
Chris@1 2000 else
Chris@1 2001 AC_MSG_RESULT([no])
Chris@1 2002 fi
Chris@1 2003 ;;
Chris@1 2004 *)
Chris@1 2005 AC_MSG_RESULT([no])
Chris@1 2006 ;;
Chris@1 2007 esac
Chris@1 2008 fi
Chris@1 2009 ])# AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 2010
Chris@1 2011
Chris@1 2012 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
Chris@1 2013 # -----------------------------
Chris@1 2014 # PORTME Fill in your ld.so characteristics
Chris@1 2015 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
Chris@1 2016 [AC_MSG_CHECKING([dynamic linker characteristics])
Chris@1 2017 library_names_spec=
Chris@1 2018 libname_spec='lib$name'
Chris@1 2019 soname_spec=
Chris@1 2020 shrext_cmds=".so"
Chris@1 2021 postinstall_cmds=
Chris@1 2022 postuninstall_cmds=
Chris@1 2023 finish_cmds=
Chris@1 2024 finish_eval=
Chris@1 2025 shlibpath_var=
Chris@1 2026 shlibpath_overrides_runpath=unknown
Chris@1 2027 version_type=none
Chris@1 2028 dynamic_linker="$host_os ld.so"
Chris@1 2029 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@1 2030 if test "$GCC" = yes; then
Chris@1 2031 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
Chris@1 2032 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
Chris@1 2033 # if the path contains ";" then we assume it to be the separator
Chris@1 2034 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@1 2035 # assumed that no part of a normal pathname contains ";" but that should
Chris@1 2036 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@1 2037 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@1 2038 else
Chris@1 2039 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@1 2040 fi
Chris@1 2041 else
Chris@1 2042 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@1 2043 fi
Chris@1 2044 need_lib_prefix=unknown
Chris@1 2045 hardcode_into_libs=no
Chris@1 2046
Chris@1 2047 # when you set need_version to no, make sure it does not cause -set_version
Chris@1 2048 # flags to be left without arguments
Chris@1 2049 need_version=unknown
Chris@1 2050
Chris@1 2051 case $host_os in
Chris@1 2052 aix3*)
Chris@1 2053 version_type=linux
Chris@1 2054 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
Chris@1 2055 shlibpath_var=LIBPATH
Chris@1 2056
Chris@1 2057 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@1 2058 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2059 ;;
Chris@1 2060
Chris@1 2061 aix4* | aix5*)
Chris@1 2062 version_type=linux
Chris@1 2063 need_lib_prefix=no
Chris@1 2064 need_version=no
Chris@1 2065 hardcode_into_libs=yes
Chris@1 2066 if test "$host_cpu" = ia64; then
Chris@1 2067 # AIX 5 supports IA64
Chris@1 2068 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
Chris@1 2069 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2070 else
Chris@1 2071 # With GCC up to 2.95.x, collect2 would create an import file
Chris@1 2072 # for dependence libraries. The import file would start with
Chris@1 2073 # the line `#! .'. This would cause the generated library to
Chris@1 2074 # depend on `.', always an invalid library. This was fixed in
Chris@1 2075 # development snapshots of GCC prior to 3.0.
Chris@1 2076 case $host_os in
Chris@1 2077 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@1 2078 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@1 2079 echo ' yes '
Chris@1 2080 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
Chris@1 2081 :
Chris@1 2082 else
Chris@1 2083 can_build_shared=no
Chris@1 2084 fi
Chris@1 2085 ;;
Chris@1 2086 esac
Chris@1 2087 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
Chris@1 2088 # soname into executable. Probably we can add versioning support to
Chris@1 2089 # collect2, so additional links can be useful in future.
Chris@1 2090 if test "$aix_use_runtimelinking" = yes; then
Chris@1 2091 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@1 2092 # instead of lib<name>.a to let people know that these are not
Chris@1 2093 # typical AIX shared libraries.
Chris@1 2094 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2095 else
Chris@1 2096 # We preserve .a as extension for shared libraries through AIX4.2
Chris@1 2097 # and later when we are not doing run time linking.
Chris@1 2098 library_names_spec='${libname}${release}.a $libname.a'
Chris@1 2099 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2100 fi
Chris@1 2101 shlibpath_var=LIBPATH
Chris@1 2102 fi
Chris@1 2103 ;;
Chris@1 2104
Chris@1 2105 amigaos*)
Chris@1 2106 library_names_spec='$libname.ixlibrary $libname.a'
Chris@1 2107 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@1 2108 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'
Chris@1 2109 ;;
Chris@1 2110
Chris@1 2111 beos*)
Chris@1 2112 library_names_spec='${libname}${shared_ext}'
Chris@1 2113 dynamic_linker="$host_os ld.so"
Chris@1 2114 shlibpath_var=LIBRARY_PATH
Chris@1 2115 ;;
Chris@1 2116
Chris@1 2117 bsdi[[45]]*)
Chris@1 2118 version_type=linux
Chris@1 2119 need_version=no
Chris@1 2120 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2121 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2122 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@1 2123 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2124 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@1 2125 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@1 2126 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@1 2127 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@1 2128 # libtool to hard-code these into programs
Chris@1 2129 ;;
Chris@1 2130
Chris@1 2131 cygwin* | mingw* | pw32*)
Chris@1 2132 version_type=windows
Chris@1 2133 shrext_cmds=".dll"
Chris@1 2134 need_version=no
Chris@1 2135 need_lib_prefix=no
Chris@1 2136
Chris@1 2137 case $GCC,$host_os in
Chris@1 2138 yes,cygwin* | yes,mingw* | yes,pw32*)
Chris@1 2139 library_names_spec='$libname.dll.a'
Chris@1 2140 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@1 2141 postinstall_cmds='base_file=`basename \${file}`~
Chris@1 2142 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
Chris@1 2143 dldir=$destdir/`dirname \$dlpath`~
Chris@1 2144 test -d \$dldir || mkdir -p \$dldir~
Chris@1 2145 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@1 2146 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@1 2147 dlpath=$dir/\$dldll~
Chris@1 2148 $rm \$dlpath'
Chris@1 2149 shlibpath_overrides_runpath=yes
Chris@1 2150
Chris@1 2151 case $host_os in
Chris@1 2152 cygwin*)
Chris@1 2153 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@1 2154 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@1 2155 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
Chris@1 2156 ;;
Chris@1 2157 mingw*)
Chris@1 2158 # MinGW DLLs use traditional 'lib' prefix
Chris@1 2159 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@1 2160 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
Chris@1 2161 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
Chris@1 2162 # It is most probably a Windows format PATH printed by
Chris@1 2163 # mingw gcc, but we are running on Cygwin. Gcc prints its search
Chris@1 2164 # path with ; separators, and with drive letters. We can handle the
Chris@1 2165 # drive letters (cygwin fileutils understands them), so leave them,
Chris@1 2166 # especially as we might pass files found there to a mingw objdump,
Chris@1 2167 # which wouldn't understand a cygwinified path. Ahh.
Chris@1 2168 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@1 2169 else
Chris@1 2170 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@1 2171 fi
Chris@1 2172 ;;
Chris@1 2173 pw32*)
Chris@1 2174 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@1 2175 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@1 2176 ;;
Chris@1 2177 esac
Chris@1 2178 ;;
Chris@1 2179
Chris@1 2180 *)
Chris@1 2181 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
Chris@1 2182 ;;
Chris@1 2183 esac
Chris@1 2184 dynamic_linker='Win32 ld.exe'
Chris@1 2185 # FIXME: first we should search . and the directory the executable is in
Chris@1 2186 shlibpath_var=PATH
Chris@1 2187 ;;
Chris@1 2188
Chris@1 2189 darwin* | rhapsody*)
Chris@1 2190 dynamic_linker="$host_os dyld"
Chris@1 2191 version_type=darwin
Chris@1 2192 need_lib_prefix=no
Chris@1 2193 need_version=no
Chris@1 2194 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
Chris@1 2195 soname_spec='${libname}${release}${major}$shared_ext'
Chris@1 2196 shlibpath_overrides_runpath=yes
Chris@1 2197 shlibpath_var=DYLD_LIBRARY_PATH
Chris@1 2198 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
Chris@1 2199 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
Chris@1 2200 if test "$GCC" = yes; then
Chris@1 2201 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"`
Chris@1 2202 else
Chris@1 2203 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
Chris@1 2204 fi
Chris@1 2205 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@1 2206 ;;
Chris@1 2207
Chris@1 2208 dgux*)
Chris@1 2209 version_type=linux
Chris@1 2210 need_lib_prefix=no
Chris@1 2211 need_version=no
Chris@1 2212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
Chris@1 2213 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2214 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2215 ;;
Chris@1 2216
Chris@1 2217 freebsd1*)
Chris@1 2218 dynamic_linker=no
Chris@1 2219 ;;
Chris@1 2220
Chris@1 2221 kfreebsd*-gnu)
Chris@1 2222 version_type=linux
Chris@1 2223 need_lib_prefix=no
Chris@1 2224 need_version=no
Chris@1 2225 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@1 2226 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2227 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2228 shlibpath_overrides_runpath=no
Chris@1 2229 hardcode_into_libs=yes
Chris@1 2230 dynamic_linker='GNU ld.so'
Chris@1 2231 ;;
Chris@1 2232
Chris@1 2233 freebsd* | dragonfly*)
Chris@1 2234 # DragonFly does not have aout. When/if they implement a new
Chris@1 2235 # versioning mechanism, adjust this.
Chris@1 2236 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
Chris@1 2237 version_type=freebsd-$objformat
Chris@1 2238 case $version_type in
Chris@1 2239 freebsd-elf*)
Chris@1 2240 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@1 2241 need_version=no
Chris@1 2242 need_lib_prefix=no
Chris@1 2243 ;;
Chris@1 2244 freebsd-*)
Chris@1 2245 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
Chris@1 2246 need_version=yes
Chris@1 2247 ;;
Chris@1 2248 esac
Chris@1 2249 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2250 case $host_os in
Chris@1 2251 freebsd2*)
Chris@1 2252 shlibpath_overrides_runpath=yes
Chris@1 2253 ;;
Chris@1 2254 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@1 2255 shlibpath_overrides_runpath=yes
Chris@1 2256 hardcode_into_libs=yes
Chris@1 2257 ;;
Chris@1 2258 *) # from 3.2 on
Chris@1 2259 shlibpath_overrides_runpath=no
Chris@1 2260 hardcode_into_libs=yes
Chris@1 2261 ;;
Chris@1 2262 esac
Chris@1 2263 ;;
Chris@1 2264
Chris@1 2265 gnu*)
Chris@1 2266 version_type=linux
Chris@1 2267 need_lib_prefix=no
Chris@1 2268 need_version=no
Chris@1 2269 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
Chris@1 2270 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2271 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2272 hardcode_into_libs=yes
Chris@1 2273 ;;
Chris@1 2274
Chris@1 2275 hpux9* | hpux10* | hpux11*)
Chris@1 2276 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@1 2277 # link against other versions.
Chris@1 2278 version_type=sunos
Chris@1 2279 need_lib_prefix=no
Chris@1 2280 need_version=no
Chris@1 2281 case "$host_cpu" in
Chris@1 2282 ia64*)
Chris@1 2283 shrext_cmds='.so'
Chris@1 2284 hardcode_into_libs=yes
Chris@1 2285 dynamic_linker="$host_os dld.so"
Chris@1 2286 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2287 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@1 2288 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2289 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2290 if test "X$HPUX_IA64_MODE" = X32; then
Chris@1 2291 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@1 2292 else
Chris@1 2293 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@1 2294 fi
Chris@1 2295 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@1 2296 ;;
Chris@1 2297 hppa*64*)
Chris@1 2298 shrext_cmds='.sl'
Chris@1 2299 hardcode_into_libs=yes
Chris@1 2300 dynamic_linker="$host_os dld.sl"
Chris@1 2301 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@1 2302 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@1 2303 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2304 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2305 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@1 2306 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@1 2307 ;;
Chris@1 2308 *)
Chris@1 2309 shrext_cmds='.sl'
Chris@1 2310 dynamic_linker="$host_os dld.sl"
Chris@1 2311 shlibpath_var=SHLIB_PATH
Chris@1 2312 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@1 2313 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2314 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2315 ;;
Chris@1 2316 esac
Chris@1 2317 # HP-UX runs *really* slowly unless shared libraries are mode 555.
Chris@1 2318 postinstall_cmds='chmod 555 $lib'
Chris@1 2319 ;;
Chris@1 2320
Chris@1 2321 irix5* | irix6* | nonstopux*)
Chris@1 2322 case $host_os in
Chris@1 2323 nonstopux*) version_type=nonstopux ;;
Chris@1 2324 *)
Chris@1 2325 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@1 2326 version_type=linux
Chris@1 2327 else
Chris@1 2328 version_type=irix
Chris@1 2329 fi ;;
Chris@1 2330 esac
Chris@1 2331 need_lib_prefix=no
Chris@1 2332 need_version=no
Chris@1 2333 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2334 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@1 2335 case $host_os in
Chris@1 2336 irix5* | nonstopux*)
Chris@1 2337 libsuff= shlibsuff=
Chris@1 2338 ;;
Chris@1 2339 *)
Chris@1 2340 case $LD in # libtool.m4 will add one of these switches to LD
Chris@1 2341 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@1 2342 libsuff= shlibsuff= libmagic=32-bit;;
Chris@1 2343 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@1 2344 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@1 2345 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@1 2346 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@1 2347 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@1 2348 esac
Chris@1 2349 ;;
Chris@1 2350 esac
Chris@1 2351 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@1 2352 shlibpath_overrides_runpath=no
Chris@1 2353 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
Chris@1 2354 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
Chris@1 2355 hardcode_into_libs=yes
Chris@1 2356 ;;
Chris@1 2357
Chris@1 2358 # No shared lib support for Linux oldld, aout, or coff.
Chris@1 2359 linux*oldld* | linux*aout* | linux*coff*)
Chris@1 2360 dynamic_linker=no
Chris@1 2361 ;;
Chris@1 2362
Chris@1 2363 # This must be Linux ELF.
Chris@1 2364 linux*)
Chris@1 2365 version_type=linux
Chris@1 2366 need_lib_prefix=no
Chris@1 2367 need_version=no
Chris@1 2368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2369 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2370 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@1 2371 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2372 shlibpath_overrides_runpath=no
Chris@1 2373 # This implies no fast_install, which is unacceptable.
Chris@1 2374 # Some rework will be needed to allow for fast_install
Chris@1 2375 # before this can be enabled.
Chris@1 2376 hardcode_into_libs=yes
Chris@1 2377
Chris@1 2378 # find out which ABI we are using
Chris@1 2379 libsuff=
Chris@1 2380 case "$host_cpu" in
Chris@1 2381 x86_64*|s390x*|powerpc64*)
Chris@1 2382 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
Chris@1 2383 if AC_TRY_EVAL(ac_compile); then
Chris@1 2384 case `/usr/bin/file conftest.$ac_objext` in
Chris@1 2385 *64-bit*)
Chris@1 2386 libsuff=64
Chris@1 2387 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
Chris@1 2388 ;;
Chris@1 2389 esac
Chris@1 2390 fi
Chris@1 2391 rm -rf conftest*
Chris@1 2392 ;;
Chris@1 2393 esac
Chris@1 2394
Chris@1 2395 # Append ld.so.conf contents to the search path
Chris@1 2396 if test -f /etc/ld.so.conf; then
Chris@1 2397 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
Chris@1 2398 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
Chris@1 2399 fi
Chris@1 2400
Chris@1 2401 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@1 2402 # powerpc, because MkLinux only supported shared libraries with the
Chris@1 2403 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@1 2404 # most powerpc-linux boxes support dynamic linking these days and
Chris@1 2405 # people can always --disable-shared, the test was removed, and we
Chris@1 2406 # assume the GNU/Linux dynamic linker is in use.
Chris@1 2407 dynamic_linker='GNU/Linux ld.so'
Chris@1 2408 ;;
Chris@1 2409
Chris@1 2410 knetbsd*-gnu)
Chris@1 2411 version_type=linux
Chris@1 2412 need_lib_prefix=no
Chris@1 2413 need_version=no
Chris@1 2414 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@1 2415 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2416 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2417 shlibpath_overrides_runpath=no
Chris@1 2418 hardcode_into_libs=yes
Chris@1 2419 dynamic_linker='GNU ld.so'
Chris@1 2420 ;;
Chris@1 2421
Chris@1 2422 netbsd*)
Chris@1 2423 version_type=sunos
Chris@1 2424 need_lib_prefix=no
Chris@1 2425 need_version=no
Chris@1 2426 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
Chris@1 2427 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@1 2428 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@1 2429 dynamic_linker='NetBSD (a.out) ld.so'
Chris@1 2430 else
Chris@1 2431 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@1 2432 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2433 dynamic_linker='NetBSD ld.elf_so'
Chris@1 2434 fi
Chris@1 2435 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2436 shlibpath_overrides_runpath=yes
Chris@1 2437 hardcode_into_libs=yes
Chris@1 2438 ;;
Chris@1 2439
Chris@1 2440 newsos6)
Chris@1 2441 version_type=linux
Chris@1 2442 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2443 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2444 shlibpath_overrides_runpath=yes
Chris@1 2445 ;;
Chris@1 2446
Chris@1 2447 nto-qnx*)
Chris@1 2448 version_type=linux
Chris@1 2449 need_lib_prefix=no
Chris@1 2450 need_version=no
Chris@1 2451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2452 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2453 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2454 shlibpath_overrides_runpath=yes
Chris@1 2455 ;;
Chris@1 2456
Chris@1 2457 openbsd*)
Chris@1 2458 version_type=sunos
Chris@1 2459 need_lib_prefix=no
Chris@1 2460 need_version=no
Chris@1 2461 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@1 2462 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@1 2463 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2464 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@1 2465 case $host_os in
Chris@1 2466 openbsd2.[[89]] | openbsd2.[[89]].*)
Chris@1 2467 shlibpath_overrides_runpath=no
Chris@1 2468 ;;
Chris@1 2469 *)
Chris@1 2470 shlibpath_overrides_runpath=yes
Chris@1 2471 ;;
Chris@1 2472 esac
Chris@1 2473 else
Chris@1 2474 shlibpath_overrides_runpath=yes
Chris@1 2475 fi
Chris@1 2476 ;;
Chris@1 2477
Chris@1 2478 os2*)
Chris@1 2479 libname_spec='$name'
Chris@1 2480 shrext_cmds=".dll"
Chris@1 2481 need_lib_prefix=no
Chris@1 2482 library_names_spec='$libname${shared_ext} $libname.a'
Chris@1 2483 dynamic_linker='OS/2 ld.exe'
Chris@1 2484 shlibpath_var=LIBPATH
Chris@1 2485 ;;
Chris@1 2486
Chris@1 2487 osf3* | osf4* | osf5*)
Chris@1 2488 version_type=osf
Chris@1 2489 need_lib_prefix=no
Chris@1 2490 need_version=no
Chris@1 2491 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2493 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2494 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@1 2495 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
Chris@1 2496 ;;
Chris@1 2497
Chris@1 2498 sco3.2v5*)
Chris@1 2499 version_type=osf
Chris@1 2500 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2501 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2502 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2503 ;;
Chris@1 2504
Chris@1 2505 solaris*)
Chris@1 2506 version_type=linux
Chris@1 2507 need_lib_prefix=no
Chris@1 2508 need_version=no
Chris@1 2509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2510 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2511 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2512 shlibpath_overrides_runpath=yes
Chris@1 2513 hardcode_into_libs=yes
Chris@1 2514 # ldd complains unless libraries are executable
Chris@1 2515 postinstall_cmds='chmod +x $lib'
Chris@1 2516 ;;
Chris@1 2517
Chris@1 2518 sunos4*)
Chris@1 2519 version_type=sunos
Chris@1 2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@1 2521 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@1 2522 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2523 shlibpath_overrides_runpath=yes
Chris@1 2524 if test "$with_gnu_ld" = yes; then
Chris@1 2525 need_lib_prefix=no
Chris@1 2526 fi
Chris@1 2527 need_version=yes
Chris@1 2528 ;;
Chris@1 2529
Chris@1 2530 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@1 2531 version_type=linux
Chris@1 2532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2533 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2534 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2535 case $host_vendor in
Chris@1 2536 sni)
Chris@1 2537 shlibpath_overrides_runpath=no
Chris@1 2538 need_lib_prefix=no
Chris@1 2539 export_dynamic_flag_spec='${wl}-Blargedynsym'
Chris@1 2540 runpath_var=LD_RUN_PATH
Chris@1 2541 ;;
Chris@1 2542 siemens)
Chris@1 2543 need_lib_prefix=no
Chris@1 2544 ;;
Chris@1 2545 motorola)
Chris@1 2546 need_lib_prefix=no
Chris@1 2547 need_version=no
Chris@1 2548 shlibpath_overrides_runpath=no
Chris@1 2549 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@1 2550 ;;
Chris@1 2551 esac
Chris@1 2552 ;;
Chris@1 2553
Chris@1 2554 sysv4*MP*)
Chris@1 2555 if test -d /usr/nec ;then
Chris@1 2556 version_type=linux
Chris@1 2557 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
Chris@1 2558 soname_spec='$libname${shared_ext}.$major'
Chris@1 2559 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2560 fi
Chris@1 2561 ;;
Chris@1 2562
Chris@1 2563 uts4*)
Chris@1 2564 version_type=linux
Chris@1 2565 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@1 2566 soname_spec='${libname}${release}${shared_ext}$major'
Chris@1 2567 shlibpath_var=LD_LIBRARY_PATH
Chris@1 2568 ;;
Chris@1 2569
Chris@1 2570 *)
Chris@1 2571 dynamic_linker=no
Chris@1 2572 ;;
Chris@1 2573 esac
Chris@1 2574 AC_MSG_RESULT([$dynamic_linker])
Chris@1 2575 test "$dynamic_linker" = no && can_build_shared=no
Chris@1 2576 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
Chris@1 2577
Chris@1 2578
Chris@1 2579 # _LT_AC_TAGCONFIG
Chris@1 2580 # ----------------
Chris@1 2581 AC_DEFUN([_LT_AC_TAGCONFIG],
Chris@1 2582 [AC_ARG_WITH([tags],
Chris@1 2583 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
Chris@1 2584 [include additional configurations @<:@automatic@:>@])],
Chris@1 2585 [tagnames="$withval"])
Chris@1 2586
Chris@1 2587 if test -f "$ltmain" && test -n "$tagnames"; then
Chris@1 2588 if test ! -f "${ofile}"; then
Chris@1 2589 AC_MSG_WARN([output file `$ofile' does not exist])
Chris@1 2590 fi
Chris@1 2591
Chris@1 2592 if test -z "$LTCC"; then
Chris@1 2593 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
Chris@1 2594 if test -z "$LTCC"; then
Chris@1 2595 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
Chris@1 2596 else
Chris@1 2597 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
Chris@1 2598 fi
Chris@1 2599 fi
Chris@1 2600
Chris@1 2601 # Extract list of available tagged configurations in $ofile.
Chris@1 2602 # Note that this assumes the entire list is on one line.
Chris@1 2603 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
Chris@1 2604
Chris@1 2605 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
Chris@1 2606 for tagname in $tagnames; do
Chris@1 2607 IFS="$lt_save_ifs"
Chris@1 2608 # Check whether tagname contains only valid characters
Chris@1 2609 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
Chris@1 2610 "") ;;
Chris@1 2611 *) AC_MSG_ERROR([invalid tag name: $tagname])
Chris@1 2612 ;;
Chris@1 2613 esac
Chris@1 2614
Chris@1 2615 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
Chris@1 2616 then
Chris@1 2617 AC_MSG_ERROR([tag name \"$tagname\" already exists])
Chris@1 2618 fi
Chris@1 2619
Chris@1 2620 # Update the list of available tags.
Chris@1 2621 if test -n "$tagname"; then
Chris@1 2622 echo appending configuration tag \"$tagname\" to $ofile
Chris@1 2623
Chris@1 2624 case $tagname in
Chris@1 2625 CXX)
Chris@1 2626 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
Chris@1 2627 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
Chris@1 2628 (test "X$CXX" != "Xg++"))) ; then
Chris@1 2629 AC_LIBTOOL_LANG_CXX_CONFIG
Chris@1 2630 else
Chris@1 2631 tagname=""
Chris@1 2632 fi
Chris@1 2633 ;;
Chris@1 2634
Chris@1 2635 F77)
Chris@1 2636 if test -n "$F77" && test "X$F77" != "Xno"; then
Chris@1 2637 AC_LIBTOOL_LANG_F77_CONFIG
Chris@1 2638 else
Chris@1 2639 tagname=""
Chris@1 2640 fi
Chris@1 2641 ;;
Chris@1 2642
Chris@1 2643 GCJ)
Chris@1 2644 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
Chris@1 2645 AC_LIBTOOL_LANG_GCJ_CONFIG
Chris@1 2646 else
Chris@1 2647 tagname=""
Chris@1 2648 fi
Chris@1 2649 ;;
Chris@1 2650
Chris@1 2651 RC)
Chris@1 2652 AC_LIBTOOL_LANG_RC_CONFIG
Chris@1 2653 ;;
Chris@1 2654
Chris@1 2655 *)
Chris@1 2656 AC_MSG_ERROR([Unsupported tag name: $tagname])
Chris@1 2657 ;;
Chris@1 2658 esac
Chris@1 2659
Chris@1 2660 # Append the new tag name to the list of available tags.
Chris@1 2661 if test -n "$tagname" ; then
Chris@1 2662 available_tags="$available_tags $tagname"
Chris@1 2663 fi
Chris@1 2664 fi
Chris@1 2665 done
Chris@1 2666 IFS="$lt_save_ifs"
Chris@1 2667
Chris@1 2668 # Now substitute the updated list of available tags.
Chris@1 2669 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
Chris@1 2670 mv "${ofile}T" "$ofile"
Chris@1 2671 chmod +x "$ofile"
Chris@1 2672 else
Chris@1 2673 rm -f "${ofile}T"
Chris@1 2674 AC_MSG_ERROR([unable to update list of available tagged configurations.])
Chris@1 2675 fi
Chris@1 2676 fi
Chris@1 2677 ])# _LT_AC_TAGCONFIG
Chris@1 2678
Chris@1 2679
Chris@1 2680 # AC_LIBTOOL_DLOPEN
Chris@1 2681 # -----------------
Chris@1 2682 # enable checks for dlopen support
Chris@1 2683 AC_DEFUN([AC_LIBTOOL_DLOPEN],
Chris@1 2684 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
Chris@1 2685 ])# AC_LIBTOOL_DLOPEN
Chris@1 2686
Chris@1 2687
Chris@1 2688 # AC_LIBTOOL_WIN32_DLL
Chris@1 2689 # --------------------
Chris@1 2690 # declare package support for building win32 dll's
Chris@1 2691 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
Chris@1 2692 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
Chris@1 2693 ])# AC_LIBTOOL_WIN32_DLL
Chris@1 2694
Chris@1 2695
Chris@1 2696 # AC_ENABLE_SHARED([DEFAULT])
Chris@1 2697 # ---------------------------
Chris@1 2698 # implement the --enable-shared flag
Chris@1 2699 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
Chris@1 2700 AC_DEFUN([AC_ENABLE_SHARED],
Chris@1 2701 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
Chris@1 2702 AC_ARG_ENABLE([shared],
Chris@1 2703 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
Chris@1 2704 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
Chris@1 2705 [p=${PACKAGE-default}
Chris@1 2706 case $enableval in
Chris@1 2707 yes) enable_shared=yes ;;
Chris@1 2708 no) enable_shared=no ;;
Chris@1 2709 *)
Chris@1 2710 enable_shared=no
Chris@1 2711 # Look at the argument we got. We use all the common list separators.
Chris@1 2712 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
Chris@1 2713 for pkg in $enableval; do
Chris@1 2714 IFS="$lt_save_ifs"
Chris@1 2715 if test "X$pkg" = "X$p"; then
Chris@1 2716 enable_shared=yes
Chris@1 2717 fi
Chris@1 2718 done
Chris@1 2719 IFS="$lt_save_ifs"
Chris@1 2720 ;;
Chris@1 2721 esac],
Chris@1 2722 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
Chris@1 2723 ])# AC_ENABLE_SHARED
Chris@1 2724
Chris@1 2725
Chris@1 2726 # AC_DISABLE_SHARED
Chris@1 2727 # -----------------
Chris@1 2728 #- set the default shared flag to --disable-shared
Chris@1 2729 AC_DEFUN([AC_DISABLE_SHARED],
Chris@1 2730 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 2731 AC_ENABLE_SHARED(no)
Chris@1 2732 ])# AC_DISABLE_SHARED
Chris@1 2733
Chris@1 2734
Chris@1 2735 # AC_ENABLE_STATIC([DEFAULT])
Chris@1 2736 # ---------------------------
Chris@1 2737 # implement the --enable-static flag
Chris@1 2738 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
Chris@1 2739 AC_DEFUN([AC_ENABLE_STATIC],
Chris@1 2740 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
Chris@1 2741 AC_ARG_ENABLE([static],
Chris@1 2742 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
Chris@1 2743 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
Chris@1 2744 [p=${PACKAGE-default}
Chris@1 2745 case $enableval in
Chris@1 2746 yes) enable_static=yes ;;
Chris@1 2747 no) enable_static=no ;;
Chris@1 2748 *)
Chris@1 2749 enable_static=no
Chris@1 2750 # Look at the argument we got. We use all the common list separators.
Chris@1 2751 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
Chris@1 2752 for pkg in $enableval; do
Chris@1 2753 IFS="$lt_save_ifs"
Chris@1 2754 if test "X$pkg" = "X$p"; then
Chris@1 2755 enable_static=yes
Chris@1 2756 fi
Chris@1 2757 done
Chris@1 2758 IFS="$lt_save_ifs"
Chris@1 2759 ;;
Chris@1 2760 esac],
Chris@1 2761 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
Chris@1 2762 ])# AC_ENABLE_STATIC
Chris@1 2763
Chris@1 2764
Chris@1 2765 # AC_DISABLE_STATIC
Chris@1 2766 # -----------------
Chris@1 2767 # set the default static flag to --disable-static
Chris@1 2768 AC_DEFUN([AC_DISABLE_STATIC],
Chris@1 2769 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 2770 AC_ENABLE_STATIC(no)
Chris@1 2771 ])# AC_DISABLE_STATIC
Chris@1 2772
Chris@1 2773
Chris@1 2774 # AC_ENABLE_FAST_INSTALL([DEFAULT])
Chris@1 2775 # ---------------------------------
Chris@1 2776 # implement the --enable-fast-install flag
Chris@1 2777 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
Chris@1 2778 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
Chris@1 2779 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
Chris@1 2780 AC_ARG_ENABLE([fast-install],
Chris@1 2781 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
Chris@1 2782 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
Chris@1 2783 [p=${PACKAGE-default}
Chris@1 2784 case $enableval in
Chris@1 2785 yes) enable_fast_install=yes ;;
Chris@1 2786 no) enable_fast_install=no ;;
Chris@1 2787 *)
Chris@1 2788 enable_fast_install=no
Chris@1 2789 # Look at the argument we got. We use all the common list separators.
Chris@1 2790 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
Chris@1 2791 for pkg in $enableval; do
Chris@1 2792 IFS="$lt_save_ifs"
Chris@1 2793 if test "X$pkg" = "X$p"; then
Chris@1 2794 enable_fast_install=yes
Chris@1 2795 fi
Chris@1 2796 done
Chris@1 2797 IFS="$lt_save_ifs"
Chris@1 2798 ;;
Chris@1 2799 esac],
Chris@1 2800 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
Chris@1 2801 ])# AC_ENABLE_FAST_INSTALL
Chris@1 2802
Chris@1 2803
Chris@1 2804 # AC_DISABLE_FAST_INSTALL
Chris@1 2805 # -----------------------
Chris@1 2806 # set the default to --disable-fast-install
Chris@1 2807 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
Chris@1 2808 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 2809 AC_ENABLE_FAST_INSTALL(no)
Chris@1 2810 ])# AC_DISABLE_FAST_INSTALL
Chris@1 2811
Chris@1 2812
Chris@1 2813 # AC_LIBTOOL_PICMODE([MODE])
Chris@1 2814 # --------------------------
Chris@1 2815 # implement the --with-pic flag
Chris@1 2816 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
Chris@1 2817 AC_DEFUN([AC_LIBTOOL_PICMODE],
Chris@1 2818 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 2819 pic_mode=ifelse($#,1,$1,default)
Chris@1 2820 ])# AC_LIBTOOL_PICMODE
Chris@1 2821
Chris@1 2822
Chris@1 2823 # AC_PROG_EGREP
Chris@1 2824 # -------------
Chris@1 2825 # This is predefined starting with Autoconf 2.54, so this conditional
Chris@1 2826 # definition can be removed once we require Autoconf 2.54 or later.
Chris@1 2827 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
Chris@1 2828 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
Chris@1 2829 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
Chris@1 2830 then ac_cv_prog_egrep='grep -E'
Chris@1 2831 else ac_cv_prog_egrep='egrep'
Chris@1 2832 fi])
Chris@1 2833 EGREP=$ac_cv_prog_egrep
Chris@1 2834 AC_SUBST([EGREP])
Chris@1 2835 ])])
Chris@1 2836
Chris@1 2837
Chris@1 2838 # AC_PATH_TOOL_PREFIX
Chris@1 2839 # -------------------
Chris@1 2840 # find a file program which can recognise shared library
Chris@1 2841 AC_DEFUN([AC_PATH_TOOL_PREFIX],
Chris@1 2842 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@1 2843 AC_MSG_CHECKING([for $1])
Chris@1 2844 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@1 2845 [case $MAGIC_CMD in
Chris@1 2846 [[\\/*] | ?:[\\/]*])
Chris@1 2847 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
Chris@1 2848 ;;
Chris@1 2849 *)
Chris@1 2850 lt_save_MAGIC_CMD="$MAGIC_CMD"
Chris@1 2851 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@1 2852 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@1 2853 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@1 2854 dnl not every word. This closes a longstanding sh security hole.
Chris@1 2855 ac_dummy="ifelse([$2], , $PATH, [$2])"
Chris@1 2856 for ac_dir in $ac_dummy; do
Chris@1 2857 IFS="$lt_save_ifs"
Chris@1 2858 test -z "$ac_dir" && ac_dir=.
Chris@1 2859 if test -f $ac_dir/$1; then
Chris@1 2860 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
Chris@1 2861 if test -n "$file_magic_test_file"; then
Chris@1 2862 case $deplibs_check_method in
Chris@1 2863 "file_magic "*)
Chris@1 2864 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
Chris@1 2865 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@1 2866 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@1 2867 $EGREP "$file_magic_regex" > /dev/null; then
Chris@1 2868 :
Chris@1 2869 else
Chris@1 2870 cat <<EOF 1>&2
Chris@1 2871
Chris@1 2872 *** Warning: the command libtool uses to detect shared libraries,
Chris@1 2873 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@1 2874 *** The result is that libtool may fail to recognize shared libraries
Chris@1 2875 *** as such. This will affect the creation of libtool libraries that
Chris@1 2876 *** depend on shared libraries, but programs linked with such libtool
Chris@1 2877 *** libraries will work regardless of this problem. Nevertheless, you
Chris@1 2878 *** may want to report the problem to your system manager and/or to
Chris@1 2879 *** bug-libtool@gnu.org
Chris@1 2880
Chris@1 2881 EOF
Chris@1 2882 fi ;;
Chris@1 2883 esac
Chris@1 2884 fi
Chris@1 2885 break
Chris@1 2886 fi
Chris@1 2887 done
Chris@1 2888 IFS="$lt_save_ifs"
Chris@1 2889 MAGIC_CMD="$lt_save_MAGIC_CMD"
Chris@1 2890 ;;
Chris@1 2891 esac])
Chris@1 2892 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@1 2893 if test -n "$MAGIC_CMD"; then
Chris@1 2894 AC_MSG_RESULT($MAGIC_CMD)
Chris@1 2895 else
Chris@1 2896 AC_MSG_RESULT(no)
Chris@1 2897 fi
Chris@1 2898 ])# AC_PATH_TOOL_PREFIX
Chris@1 2899
Chris@1 2900
Chris@1 2901 # AC_PATH_MAGIC
Chris@1 2902 # -------------
Chris@1 2903 # find a file program which can recognise a shared library
Chris@1 2904 AC_DEFUN([AC_PATH_MAGIC],
Chris@1 2905 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@1 2906 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@1 2907 if test -n "$ac_tool_prefix"; then
Chris@1 2908 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@1 2909 else
Chris@1 2910 MAGIC_CMD=:
Chris@1 2911 fi
Chris@1 2912 fi
Chris@1 2913 ])# AC_PATH_MAGIC
Chris@1 2914
Chris@1 2915
Chris@1 2916 # AC_PROG_LD
Chris@1 2917 # ----------
Chris@1 2918 # find the pathname to the GNU or non-GNU linker
Chris@1 2919 AC_DEFUN([AC_PROG_LD],
Chris@1 2920 [AC_ARG_WITH([gnu-ld],
Chris@1 2921 [AC_HELP_STRING([--with-gnu-ld],
Chris@1 2922 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@1 2923 [test "$withval" = no || with_gnu_ld=yes],
Chris@1 2924 [with_gnu_ld=no])
Chris@1 2925 AC_REQUIRE([LT_AC_PROG_SED])dnl
Chris@1 2926 AC_REQUIRE([AC_PROG_CC])dnl
Chris@1 2927 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@1 2928 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@1 2929 ac_prog=ld
Chris@1 2930 if test "$GCC" = yes; then
Chris@1 2931 # Check if gcc -print-prog-name=ld gives a path.
Chris@1 2932 AC_MSG_CHECKING([for ld used by $CC])
Chris@1 2933 case $host in
Chris@1 2934 *-*-mingw*)
Chris@1 2935 # gcc leaves a trailing carriage return which upsets mingw
Chris@1 2936 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@1 2937 *)
Chris@1 2938 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@1 2939 esac
Chris@1 2940 case $ac_prog in
Chris@1 2941 # Accept absolute paths.
Chris@1 2942 [[\\/]]* | ?:[[\\/]]*)
Chris@1 2943 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@1 2944 # Canonicalize the pathname of ld
Chris@1 2945 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
Chris@1 2946 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
Chris@1 2947 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
Chris@1 2948 done
Chris@1 2949 test -z "$LD" && LD="$ac_prog"
Chris@1 2950 ;;
Chris@1 2951 "")
Chris@1 2952 # If it fails, then pretend we aren't using GCC.
Chris@1 2953 ac_prog=ld
Chris@1 2954 ;;
Chris@1 2955 *)
Chris@1 2956 # If it is relative, then search for the first ld in PATH.
Chris@1 2957 with_gnu_ld=unknown
Chris@1 2958 ;;
Chris@1 2959 esac
Chris@1 2960 elif test "$with_gnu_ld" = yes; then
Chris@1 2961 AC_MSG_CHECKING([for GNU ld])
Chris@1 2962 else
Chris@1 2963 AC_MSG_CHECKING([for non-GNU ld])
Chris@1 2964 fi
Chris@1 2965 AC_CACHE_VAL(lt_cv_path_LD,
Chris@1 2966 [if test -z "$LD"; then
Chris@1 2967 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@1 2968 for ac_dir in $PATH; do
Chris@1 2969 IFS="$lt_save_ifs"
Chris@1 2970 test -z "$ac_dir" && ac_dir=.
Chris@1 2971 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@1 2972 lt_cv_path_LD="$ac_dir/$ac_prog"
Chris@1 2973 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@1 2974 # but apparently some GNU ld's only accept -v.
Chris@1 2975 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@1 2976 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@1 2977 *GNU* | *'with BFD'*)
Chris@1 2978 test "$with_gnu_ld" != no && break
Chris@1 2979 ;;
Chris@1 2980 *)
Chris@1 2981 test "$with_gnu_ld" != yes && break
Chris@1 2982 ;;
Chris@1 2983 esac
Chris@1 2984 fi
Chris@1 2985 done
Chris@1 2986 IFS="$lt_save_ifs"
Chris@1 2987 else
Chris@1 2988 lt_cv_path_LD="$LD" # Let the user override the test with a path.
Chris@1 2989 fi])
Chris@1 2990 LD="$lt_cv_path_LD"
Chris@1 2991 if test -n "$LD"; then
Chris@1 2992 AC_MSG_RESULT($LD)
Chris@1 2993 else
Chris@1 2994 AC_MSG_RESULT(no)
Chris@1 2995 fi
Chris@1 2996 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@1 2997 AC_PROG_LD_GNU
Chris@1 2998 ])# AC_PROG_LD
Chris@1 2999
Chris@1 3000
Chris@1 3001 # AC_PROG_LD_GNU
Chris@1 3002 # --------------
Chris@1 3003 AC_DEFUN([AC_PROG_LD_GNU],
Chris@1 3004 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@1 3005 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@1 3006 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
Chris@1 3007 case `$LD -v 2>&1 </dev/null` in
Chris@1 3008 *GNU* | *'with BFD'*)
Chris@1 3009 lt_cv_prog_gnu_ld=yes
Chris@1 3010 ;;
Chris@1 3011 *)
Chris@1 3012 lt_cv_prog_gnu_ld=no
Chris@1 3013 ;;
Chris@1 3014 esac])
Chris@1 3015 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@1 3016 ])# AC_PROG_LD_GNU
Chris@1 3017
Chris@1 3018
Chris@1 3019 # AC_PROG_LD_RELOAD_FLAG
Chris@1 3020 # ----------------------
Chris@1 3021 # find reload flag for linker
Chris@1 3022 # -- PORTME Some linkers may need a different reload flag.
Chris@1 3023 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
Chris@1 3024 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@1 3025 lt_cv_ld_reload_flag,
Chris@1 3026 [lt_cv_ld_reload_flag='-r'])
Chris@1 3027 reload_flag=$lt_cv_ld_reload_flag
Chris@1 3028 case $reload_flag in
Chris@1 3029 "" | " "*) ;;
Chris@1 3030 *) reload_flag=" $reload_flag" ;;
Chris@1 3031 esac
Chris@1 3032 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@1 3033 case $host_os in
Chris@1 3034 darwin*)
Chris@1 3035 if test "$GCC" = yes; then
Chris@1 3036 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
Chris@1 3037 else
Chris@1 3038 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@1 3039 fi
Chris@1 3040 ;;
Chris@1 3041 esac
Chris@1 3042 ])# AC_PROG_LD_RELOAD_FLAG
Chris@1 3043
Chris@1 3044
Chris@1 3045 # AC_DEPLIBS_CHECK_METHOD
Chris@1 3046 # -----------------------
Chris@1 3047 # how to check for library dependencies
Chris@1 3048 # -- PORTME fill in with the dynamic library characteristics
Chris@1 3049 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
Chris@1 3050 [AC_CACHE_CHECK([how to recognise dependent libraries],
Chris@1 3051 lt_cv_deplibs_check_method,
Chris@1 3052 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@1 3053 lt_cv_file_magic_test_file=
Chris@1 3054 lt_cv_deplibs_check_method='unknown'
Chris@1 3055 # Need to set the preceding variable on all platforms that support
Chris@1 3056 # interlibrary dependencies.
Chris@1 3057 # 'none' -- dependencies not supported.
Chris@1 3058 # `unknown' -- same as none, but documents that we really don't know.
Chris@1 3059 # 'pass_all' -- all dependencies passed with no checks.
Chris@1 3060 # 'test_compile' -- check by making test program.
Chris@1 3061 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@1 3062 # which responds to the $file_magic_cmd with a given extended regex.
Chris@1 3063 # If you have `file' or equivalent on your system and you're not sure
Chris@1 3064 # whether `pass_all' will *always* work, you probably want this one.
Chris@1 3065
Chris@1 3066 case $host_os in
Chris@1 3067 aix4* | aix5*)
Chris@1 3068 lt_cv_deplibs_check_method=pass_all
Chris@1 3069 ;;
Chris@1 3070
Chris@1 3071 beos*)
Chris@1 3072 lt_cv_deplibs_check_method=pass_all
Chris@1 3073 ;;
Chris@1 3074
Chris@1 3075 bsdi[[45]]*)
Chris@1 3076 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@1 3077 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@1 3078 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@1 3079 ;;
Chris@1 3080
Chris@1 3081 cygwin*)
Chris@1 3082 # func_win32_libid is a shell function defined in ltmain.sh
Chris@1 3083 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@1 3084 lt_cv_file_magic_cmd='func_win32_libid'
Chris@1 3085 ;;
Chris@1 3086
Chris@1 3087 mingw* | pw32*)
Chris@1 3088 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@1 3089 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
Chris@1 3090 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
Chris@1 3091 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@1 3092 ;;
Chris@1 3093
Chris@1 3094 darwin* | rhapsody*)
Chris@1 3095 lt_cv_deplibs_check_method=pass_all
Chris@1 3096 ;;
Chris@1 3097
Chris@1 3098 freebsd* | kfreebsd*-gnu | dragonfly*)
Chris@1 3099 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
Chris@1 3100 case $host_cpu in
Chris@1 3101 i*86 )
Chris@1 3102 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@1 3103 # Let's accept both of them until this is cleared up.
Chris@1 3104 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@1 3105 lt_cv_file_magic_cmd=/usr/bin/file
Chris@1 3106 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@1 3107 ;;
Chris@1 3108 esac
Chris@1 3109 else
Chris@1 3110 lt_cv_deplibs_check_method=pass_all
Chris@1 3111 fi
Chris@1 3112 ;;
Chris@1 3113
Chris@1 3114 gnu*)
Chris@1 3115 lt_cv_deplibs_check_method=pass_all
Chris@1 3116 ;;
Chris@1 3117
Chris@1 3118 hpux10.20* | hpux11*)
Chris@1 3119 lt_cv_file_magic_cmd=/usr/bin/file
Chris@1 3120 case "$host_cpu" in
Chris@1 3121 ia64*)
Chris@1 3122 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@1 3123 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@1 3124 ;;
Chris@1 3125 hppa*64*)
Chris@1 3126 [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]']
Chris@1 3127 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@1 3128 ;;
Chris@1 3129 *)
Chris@1 3130 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
Chris@1 3131 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@1 3132 ;;
Chris@1 3133 esac
Chris@1 3134 ;;
Chris@1 3135
Chris@1 3136 irix5* | irix6* | nonstopux*)
Chris@1 3137 case $LD in
Chris@1 3138 *-32|*"-32 ") libmagic=32-bit;;
Chris@1 3139 *-n32|*"-n32 ") libmagic=N32;;
Chris@1 3140 *-64|*"-64 ") libmagic=64-bit;;
Chris@1 3141 *) libmagic=never-match;;
Chris@1 3142 esac
Chris@1 3143 lt_cv_deplibs_check_method=pass_all
Chris@1 3144 ;;
Chris@1 3145
Chris@1 3146 # This must be Linux ELF.
Chris@1 3147 linux*)
Chris@1 3148 lt_cv_deplibs_check_method=pass_all
Chris@1 3149 ;;
Chris@1 3150
Chris@1 3151 netbsd*)
Chris@1 3152 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
Chris@1 3153 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@1 3154 else
Chris@1 3155 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@1 3156 fi
Chris@1 3157 ;;
Chris@1 3158
Chris@1 3159 newos6*)
Chris@1 3160 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@1 3161 lt_cv_file_magic_cmd=/usr/bin/file
Chris@1 3162 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@1 3163 ;;
Chris@1 3164
Chris@1 3165 nto-qnx*)
Chris@1 3166 lt_cv_deplibs_check_method=unknown
Chris@1 3167 ;;
Chris@1 3168
Chris@1 3169 openbsd*)
Chris@1 3170 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@1 3171 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@1 3172 else
Chris@1 3173 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@1 3174 fi
Chris@1 3175 ;;
Chris@1 3176
Chris@1 3177 osf3* | osf4* | osf5*)
Chris@1 3178 lt_cv_deplibs_check_method=pass_all
Chris@1 3179 ;;
Chris@1 3180
Chris@1 3181 sco3.2v5*)
Chris@1 3182 lt_cv_deplibs_check_method=pass_all
Chris@1 3183 ;;
Chris@1 3184
Chris@1 3185 solaris*)
Chris@1 3186 lt_cv_deplibs_check_method=pass_all
Chris@1 3187 ;;
Chris@1 3188
Chris@1 3189 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@1 3190 case $host_vendor in
Chris@1 3191 motorola)
Chris@1 3192 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]]'
Chris@1 3193 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@1 3194 ;;
Chris@1 3195 ncr)
Chris@1 3196 lt_cv_deplibs_check_method=pass_all
Chris@1 3197 ;;
Chris@1 3198 sequent)
Chris@1 3199 lt_cv_file_magic_cmd='/bin/file'
Chris@1 3200 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@1 3201 ;;
Chris@1 3202 sni)
Chris@1 3203 lt_cv_file_magic_cmd='/bin/file'
Chris@1 3204 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@1 3205 lt_cv_file_magic_test_file=/lib/libc.so
Chris@1 3206 ;;
Chris@1 3207 siemens)
Chris@1 3208 lt_cv_deplibs_check_method=pass_all
Chris@1 3209 ;;
Chris@1 3210 esac
Chris@1 3211 ;;
Chris@1 3212
Chris@1 3213 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
Chris@1 3214 lt_cv_deplibs_check_method=pass_all
Chris@1 3215 ;;
Chris@1 3216 esac
Chris@1 3217 ])
Chris@1 3218 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@1 3219 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@1 3220 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@1 3221 ])# AC_DEPLIBS_CHECK_METHOD
Chris@1 3222
Chris@1 3223
Chris@1 3224 # AC_PROG_NM
Chris@1 3225 # ----------
Chris@1 3226 # find the pathname to a BSD-compatible name lister
Chris@1 3227 AC_DEFUN([AC_PROG_NM],
Chris@1 3228 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
Chris@1 3229 [if test -n "$NM"; then
Chris@1 3230 # Let the user override the test.
Chris@1 3231 lt_cv_path_NM="$NM"
Chris@1 3232 else
Chris@1 3233 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@1 3234 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
Chris@1 3235 IFS="$lt_save_ifs"
Chris@1 3236 test -z "$ac_dir" && ac_dir=.
Chris@1 3237 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
Chris@1 3238 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
Chris@1 3239 # Check to see if the nm accepts a BSD-compat flag.
Chris@1 3240 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
Chris@1 3241 # nm: unknown option "B" ignored
Chris@1 3242 # Tru64's nm complains that /dev/null is an invalid object file
Chris@1 3243 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
Chris@1 3244 */dev/null* | *'Invalid file or object type'*)
Chris@1 3245 lt_cv_path_NM="$tmp_nm -B"
Chris@1 3246 break
Chris@1 3247 ;;
Chris@1 3248 *)
Chris@1 3249 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@1 3250 */dev/null*)
Chris@1 3251 lt_cv_path_NM="$tmp_nm -p"
Chris@1 3252 break
Chris@1 3253 ;;
Chris@1 3254 *)
Chris@1 3255 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@1 3256 continue # so that we can try to find one that supports BSD flags
Chris@1 3257 ;;
Chris@1 3258 esac
Chris@1 3259 esac
Chris@1 3260 fi
Chris@1 3261 done
Chris@1 3262 IFS="$lt_save_ifs"
Chris@1 3263 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
Chris@1 3264 fi])
Chris@1 3265 NM="$lt_cv_path_NM"
Chris@1 3266 ])# AC_PROG_NM
Chris@1 3267
Chris@1 3268
Chris@1 3269 # AC_CHECK_LIBM
Chris@1 3270 # -------------
Chris@1 3271 # check for math library
Chris@1 3272 AC_DEFUN([AC_CHECK_LIBM],
Chris@1 3273 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@1 3274 LIBM=
Chris@1 3275 case $host in
Chris@1 3276 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
Chris@1 3277 # These system don't have libm, or don't need it
Chris@1 3278 ;;
Chris@1 3279 *-ncr-sysv4.3*)
Chris@1 3280 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
Chris@1 3281 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@1 3282 ;;
Chris@1 3283 *)
Chris@1 3284 AC_CHECK_LIB(m, cos, LIBM="-lm")
Chris@1 3285 ;;
Chris@1 3286 esac
Chris@1 3287 ])# AC_CHECK_LIBM
Chris@1 3288
Chris@1 3289
Chris@1 3290 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
Chris@1 3291 # -----------------------------------
Chris@1 3292 # sets LIBLTDL to the link flags for the libltdl convenience library and
Chris@1 3293 # LTDLINCL to the include flags for the libltdl header and adds
Chris@1 3294 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
Chris@1 3295 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
Chris@1 3296 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
Chris@1 3297 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
Chris@1 3298 # '${top_srcdir}/' (note the single quotes!). If your package is not
Chris@1 3299 # flat and you're not using automake, define top_builddir and
Chris@1 3300 # top_srcdir appropriately in the Makefiles.
Chris@1 3301 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
Chris@1 3302 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 3303 case $enable_ltdl_convenience in
Chris@1 3304 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
Chris@1 3305 "") enable_ltdl_convenience=yes
Chris@1 3306 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
Chris@1 3307 esac
Chris@1 3308 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
Chris@1 3309 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
Chris@1 3310 # For backwards non-gettext consistent compatibility...
Chris@1 3311 INCLTDL="$LTDLINCL"
Chris@1 3312 ])# AC_LIBLTDL_CONVENIENCE
Chris@1 3313
Chris@1 3314
Chris@1 3315 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
Chris@1 3316 # -----------------------------------
Chris@1 3317 # sets LIBLTDL to the link flags for the libltdl installable library and
Chris@1 3318 # LTDLINCL to the include flags for the libltdl header and adds
Chris@1 3319 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
Chris@1 3320 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
Chris@1 3321 # DIRECTORY is not provided and an installed libltdl is not found, it is
Chris@1 3322 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
Chris@1 3323 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
Chris@1 3324 # quotes!). If your package is not flat and you're not using automake,
Chris@1 3325 # define top_builddir and top_srcdir appropriately in the Makefiles.
Chris@1 3326 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
Chris@1 3327 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
Chris@1 3328 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
Chris@1 3329 AC_CHECK_LIB(ltdl, lt_dlinit,
Chris@1 3330 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
Chris@1 3331 [if test x"$enable_ltdl_install" = xno; then
Chris@1 3332 AC_MSG_WARN([libltdl not installed, but installation disabled])
Chris@1 3333 else
Chris@1 3334 enable_ltdl_install=yes
Chris@1 3335 fi
Chris@1 3336 ])
Chris@1 3337 if test x"$enable_ltdl_install" = x"yes"; then
Chris@1 3338 ac_configure_args="$ac_configure_args --enable-ltdl-install"
Chris@1 3339 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
Chris@1 3340 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
Chris@1 3341 else
Chris@1 3342 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
Chris@1 3343 LIBLTDL="-lltdl"
Chris@1 3344 LTDLINCL=
Chris@1 3345 fi
Chris@1 3346 # For backwards non-gettext consistent compatibility...
Chris@1 3347 INCLTDL="$LTDLINCL"
Chris@1 3348 ])# AC_LIBLTDL_INSTALLABLE
Chris@1 3349
Chris@1 3350
Chris@1 3351 # AC_LIBTOOL_CXX
Chris@1 3352 # --------------
Chris@1 3353 # enable support for C++ libraries
Chris@1 3354 AC_DEFUN([AC_LIBTOOL_CXX],
Chris@1 3355 [AC_REQUIRE([_LT_AC_LANG_CXX])
Chris@1 3356 ])# AC_LIBTOOL_CXX
Chris@1 3357
Chris@1 3358
Chris@1 3359 # _LT_AC_LANG_CXX
Chris@1 3360 # ---------------
Chris@1 3361 AC_DEFUN([_LT_AC_LANG_CXX],
Chris@1 3362 [AC_REQUIRE([AC_PROG_CXX])
Chris@1 3363 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
Chris@1 3364 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
Chris@1 3365 ])# _LT_AC_LANG_CXX
Chris@1 3366
Chris@1 3367 # _LT_AC_PROG_CXXCPP
Chris@1 3368 # ---------------
Chris@1 3369 AC_DEFUN([_LT_AC_PROG_CXXCPP],
Chris@1 3370 [
Chris@1 3371 AC_REQUIRE([AC_PROG_CXX])
Chris@1 3372 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
Chris@1 3373 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
Chris@1 3374 (test "X$CXX" != "Xg++"))) ; then
Chris@1 3375 AC_PROG_CXXCPP
Chris@1 3376 fi
Chris@1 3377 ])# _LT_AC_PROG_CXXCPP
Chris@1 3378
Chris@1 3379 # AC_LIBTOOL_F77
Chris@1 3380 # --------------
Chris@1 3381 # enable support for Fortran 77 libraries
Chris@1 3382 AC_DEFUN([AC_LIBTOOL_F77],
Chris@1 3383 [AC_REQUIRE([_LT_AC_LANG_F77])
Chris@1 3384 ])# AC_LIBTOOL_F77
Chris@1 3385
Chris@1 3386
Chris@1 3387 # _LT_AC_LANG_F77
Chris@1 3388 # ---------------
Chris@1 3389 AC_DEFUN([_LT_AC_LANG_F77],
Chris@1 3390 [AC_REQUIRE([AC_PROG_F77])
Chris@1 3391 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
Chris@1 3392 ])# _LT_AC_LANG_F77
Chris@1 3393
Chris@1 3394
Chris@1 3395 # AC_LIBTOOL_GCJ
Chris@1 3396 # --------------
Chris@1 3397 # enable support for GCJ libraries
Chris@1 3398 AC_DEFUN([AC_LIBTOOL_GCJ],
Chris@1 3399 [AC_REQUIRE([_LT_AC_LANG_GCJ])
Chris@1 3400 ])# AC_LIBTOOL_GCJ
Chris@1 3401
Chris@1 3402
Chris@1 3403 # _LT_AC_LANG_GCJ
Chris@1 3404 # ---------------
Chris@1 3405 AC_DEFUN([_LT_AC_LANG_GCJ],
Chris@1 3406 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
Chris@1 3407 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
Chris@1 3408 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
Chris@1 3409 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
Chris@1 3410 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
Chris@1 3411 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
Chris@1 3412 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
Chris@1 3413 ])# _LT_AC_LANG_GCJ
Chris@1 3414
Chris@1 3415
Chris@1 3416 # AC_LIBTOOL_RC
Chris@1 3417 # --------------
Chris@1 3418 # enable support for Windows resource files
Chris@1 3419 AC_DEFUN([AC_LIBTOOL_RC],
Chris@1 3420 [AC_REQUIRE([LT_AC_PROG_RC])
Chris@1 3421 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
Chris@1 3422 ])# AC_LIBTOOL_RC
Chris@1 3423
Chris@1 3424
Chris@1 3425 # AC_LIBTOOL_LANG_C_CONFIG
Chris@1 3426 # ------------------------
Chris@1 3427 # Ensure that the configuration vars for the C compiler are
Chris@1 3428 # suitably defined. Those variables are subsequently used by
Chris@1 3429 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Chris@1 3430 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
Chris@1 3431 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
Chris@1 3432 [lt_save_CC="$CC"
Chris@1 3433 AC_LANG_PUSH(C)
Chris@1 3434
Chris@1 3435 # Source file extension for C test sources.
Chris@1 3436 ac_ext=c
Chris@1 3437
Chris@1 3438 # Object file extension for compiled C test sources.
Chris@1 3439 objext=o
Chris@1 3440 _LT_AC_TAGVAR(objext, $1)=$objext
Chris@1 3441
Chris@1 3442 # Code to be used in simple compile tests
Chris@1 3443 lt_simple_compile_test_code="int some_variable = 0;\n"
Chris@1 3444
Chris@1 3445 # Code to be used in simple link tests
Chris@1 3446 lt_simple_link_test_code='int main(){return(0);}\n'
Chris@1 3447
Chris@1 3448 _LT_AC_SYS_COMPILER
Chris@1 3449
Chris@1 3450 # save warnings/boilerplate of simple test code
Chris@1 3451 _LT_COMPILER_BOILERPLATE
Chris@1 3452 _LT_LINKER_BOILERPLATE
Chris@1 3453
Chris@1 3454 #
Chris@1 3455 # Check for any special shared library compilation flags.
Chris@1 3456 #
Chris@1 3457 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
Chris@1 3458 if test "$GCC" = no; then
Chris@1 3459 case $host_os in
Chris@1 3460 sco3.2v5*)
Chris@1 3461 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
Chris@1 3462 ;;
Chris@1 3463 esac
Chris@1 3464 fi
Chris@1 3465 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
Chris@1 3466 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
Chris@1 3467 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
Chris@1 3468 else
Chris@1 3469 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
Chris@1 3470 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
Chris@1 3471 fi
Chris@1 3472 fi
Chris@1 3473
Chris@1 3474
Chris@1 3475 #
Chris@1 3476 # Check to make sure the static flag actually works.
Chris@1 3477 #
Chris@1 3478 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
Chris@1 3479 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
Chris@1 3480 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
Chris@1 3481 [],
Chris@1 3482 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@1 3483
Chris@1 3484
Chris@1 3485 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
Chris@1 3486 AC_LIBTOOL_PROG_COMPILER_PIC($1)
Chris@1 3487 AC_LIBTOOL_PROG_CC_C_O($1)
Chris@1 3488 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
Chris@1 3489 AC_LIBTOOL_PROG_LD_SHLIBS($1)
Chris@1 3490 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
Chris@1 3491 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
Chris@1 3492 AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 3493 AC_LIBTOOL_DLOPEN_SELF($1)
Chris@1 3494
Chris@1 3495 # Report which librarie types wil actually be built
Chris@1 3496 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@1 3497 AC_MSG_RESULT([$can_build_shared])
Chris@1 3498
Chris@1 3499 AC_MSG_CHECKING([whether to build shared libraries])
Chris@1 3500 test "$can_build_shared" = "no" && enable_shared=no
Chris@1 3501
Chris@1 3502 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@1 3503 # are all built from PIC.
Chris@1 3504 case "$host_os" in
Chris@1 3505 aix3*)
Chris@1 3506 test "$enable_shared" = yes && enable_static=no
Chris@1 3507 if test -n "$RANLIB"; then
Chris@1 3508 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@1 3509 postinstall_cmds='$RANLIB $lib'
Chris@1 3510 fi
Chris@1 3511 ;;
Chris@1 3512
Chris@1 3513 aix4* | aix5*)
Chris@1 3514 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@1 3515 test "$enable_shared" = yes && enable_static=no
Chris@1 3516 fi
Chris@1 3517 ;;
Chris@1 3518 esac
Chris@1 3519 AC_MSG_RESULT([$enable_shared])
Chris@1 3520
Chris@1 3521 AC_MSG_CHECKING([whether to build static libraries])
Chris@1 3522 # Make sure either enable_shared or enable_static is yes.
Chris@1 3523 test "$enable_shared" = yes || enable_static=yes
Chris@1 3524 AC_MSG_RESULT([$enable_static])
Chris@1 3525
Chris@1 3526 AC_LIBTOOL_CONFIG($1)
Chris@1 3527
Chris@1 3528 AC_LANG_POP
Chris@1 3529 CC="$lt_save_CC"
Chris@1 3530 ])# AC_LIBTOOL_LANG_C_CONFIG
Chris@1 3531
Chris@1 3532
Chris@1 3533 # AC_LIBTOOL_LANG_CXX_CONFIG
Chris@1 3534 # --------------------------
Chris@1 3535 # Ensure that the configuration vars for the C compiler are
Chris@1 3536 # suitably defined. Those variables are subsequently used by
Chris@1 3537 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Chris@1 3538 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
Chris@1 3539 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
Chris@1 3540 [AC_LANG_PUSH(C++)
Chris@1 3541 AC_REQUIRE([AC_PROG_CXX])
Chris@1 3542 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
Chris@1 3543
Chris@1 3544 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 3545 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
Chris@1 3546 _LT_AC_TAGVAR(always_export_symbols, $1)=no
Chris@1 3547 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
Chris@1 3548 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@1 3549 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 3550 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@1 3551 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
Chris@1 3552 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
Chris@1 3553 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
Chris@1 3554 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
Chris@1 3555 _LT_AC_TAGVAR(module_cmds, $1)=
Chris@1 3556 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
Chris@1 3557 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
Chris@1 3558 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@1 3559 _LT_AC_TAGVAR(no_undefined_flag, $1)=
Chris@1 3560 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 3561 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@1 3562
Chris@1 3563 # Dependencies to place before and after the object being linked:
Chris@1 3564 _LT_AC_TAGVAR(predep_objects, $1)=
Chris@1 3565 _LT_AC_TAGVAR(postdep_objects, $1)=
Chris@1 3566 _LT_AC_TAGVAR(predeps, $1)=
Chris@1 3567 _LT_AC_TAGVAR(postdeps, $1)=
Chris@1 3568 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
Chris@1 3569
Chris@1 3570 # Source file extension for C++ test sources.
Chris@1 3571 ac_ext=cc
Chris@1 3572
Chris@1 3573 # Object file extension for compiled C++ test sources.
Chris@1 3574 objext=o
Chris@1 3575 _LT_AC_TAGVAR(objext, $1)=$objext
Chris@1 3576
Chris@1 3577 # Code to be used in simple compile tests
Chris@1 3578 lt_simple_compile_test_code="int some_variable = 0;\n"
Chris@1 3579
Chris@1 3580 # Code to be used in simple link tests
Chris@1 3581 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
Chris@1 3582
Chris@1 3583 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@1 3584 _LT_AC_SYS_COMPILER
Chris@1 3585
Chris@1 3586 # save warnings/boilerplate of simple test code
Chris@1 3587 _LT_COMPILER_BOILERPLATE
Chris@1 3588 _LT_LINKER_BOILERPLATE
Chris@1 3589
Chris@1 3590 # Allow CC to be a program name with arguments.
Chris@1 3591 lt_save_CC=$CC
Chris@1 3592 lt_save_LD=$LD
Chris@1 3593 lt_save_GCC=$GCC
Chris@1 3594 GCC=$GXX
Chris@1 3595 lt_save_with_gnu_ld=$with_gnu_ld
Chris@1 3596 lt_save_path_LD=$lt_cv_path_LD
Chris@1 3597 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@1 3598 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@1 3599 else
Chris@1 3600 unset lt_cv_prog_gnu_ld
Chris@1 3601 fi
Chris@1 3602 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@1 3603 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@1 3604 else
Chris@1 3605 unset lt_cv_path_LD
Chris@1 3606 fi
Chris@1 3607 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@1 3608 CC=${CXX-"c++"}
Chris@1 3609 compiler=$CC
Chris@1 3610 _LT_AC_TAGVAR(compiler, $1)=$CC
Chris@1 3611 _LT_CC_BASENAME([$compiler])
Chris@1 3612
Chris@1 3613 # We don't want -fno-exception wen compiling C++ code, so set the
Chris@1 3614 # no_builtin_flag separately
Chris@1 3615 if test "$GXX" = yes; then
Chris@1 3616 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@1 3617 else
Chris@1 3618 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@1 3619 fi
Chris@1 3620
Chris@1 3621 if test "$GXX" = yes; then
Chris@1 3622 # Set up default GNU C++ configuration
Chris@1 3623
Chris@1 3624 AC_PROG_LD
Chris@1 3625
Chris@1 3626 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@1 3627 # archiving commands below assume that GNU ld is being used.
Chris@1 3628 if test "$with_gnu_ld" = yes; then
Chris@1 3629 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 3630 _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'
Chris@1 3631
Chris@1 3632 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
Chris@1 3633 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@1 3634
Chris@1 3635 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@1 3636 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@1 3637 # investigate it a little bit more. (MM)
Chris@1 3638 wlarc='${wl}'
Chris@1 3639
Chris@1 3640 # ancient GNU ld didn't support --whole-archive et. al.
Chris@1 3641 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
Chris@1 3642 grep 'no-whole-archive' > /dev/null; then
Chris@1 3643 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@1 3644 else
Chris@1 3645 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 3646 fi
Chris@1 3647 else
Chris@1 3648 with_gnu_ld=no
Chris@1 3649 wlarc=
Chris@1 3650
Chris@1 3651 # A generic and very simple default shared library creation
Chris@1 3652 # command for GNU C++ for the case where it uses the native
Chris@1 3653 # linker, instead of GNU ld. If possible, this setting should
Chris@1 3654 # overridden to take advantage of the native linker features on
Chris@1 3655 # the platform it is being used on.
Chris@1 3656 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@1 3657 fi
Chris@1 3658
Chris@1 3659 # Commands to make compiler produce verbose output that lists
Chris@1 3660 # what "hidden" libraries, object files and flags are used when
Chris@1 3661 # linking a shared library.
Chris@1 3662 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
Chris@1 3663
Chris@1 3664 else
Chris@1 3665 GXX=no
Chris@1 3666 with_gnu_ld=no
Chris@1 3667 wlarc=
Chris@1 3668 fi
Chris@1 3669
Chris@1 3670 # PORTME: fill in a description of your system's C++ link characteristics
Chris@1 3671 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@1 3672 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
Chris@1 3673 case $host_os in
Chris@1 3674 aix3*)
Chris@1 3675 # FIXME: insert proper C++ library support
Chris@1 3676 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3677 ;;
Chris@1 3678 aix4* | aix5*)
Chris@1 3679 if test "$host_cpu" = ia64; then
Chris@1 3680 # On IA64, the linker does run time linking by default, so we don't
Chris@1 3681 # have to do anything special.
Chris@1 3682 aix_use_runtimelinking=no
Chris@1 3683 exp_sym_flag='-Bexport'
Chris@1 3684 no_entry_flag=""
Chris@1 3685 else
Chris@1 3686 aix_use_runtimelinking=no
Chris@1 3687
Chris@1 3688 # Test if we are trying to use run time linking or normal
Chris@1 3689 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@1 3690 # need to do runtime linking.
Chris@1 3691 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
Chris@1 3692 for ld_flag in $LDFLAGS; do
Chris@1 3693 case $ld_flag in
Chris@1 3694 *-brtl*)
Chris@1 3695 aix_use_runtimelinking=yes
Chris@1 3696 break
Chris@1 3697 ;;
Chris@1 3698 esac
Chris@1 3699 done
Chris@1 3700 esac
Chris@1 3701
Chris@1 3702 exp_sym_flag='-bexport'
Chris@1 3703 no_entry_flag='-bnoentry'
Chris@1 3704 fi
Chris@1 3705
Chris@1 3706 # When large executables or shared objects are built, AIX ld can
Chris@1 3707 # have problems creating the table of contents. If linking a library
Chris@1 3708 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@1 3709 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@1 3710 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@1 3711
Chris@1 3712 _LT_AC_TAGVAR(archive_cmds, $1)=''
Chris@1 3713 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 3714 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@1 3715 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 3716
Chris@1 3717 if test "$GXX" = yes; then
Chris@1 3718 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@1 3719 # We only want to do this on AIX 4.2 and lower, the check
Chris@1 3720 # below for broken collect2 doesn't work under 4.3+
Chris@1 3721 collect2name=`${CC} -print-prog-name=collect2`
Chris@1 3722 if test -f "$collect2name" && \
Chris@1 3723 strings "$collect2name" | grep resolve_lib_name >/dev/null
Chris@1 3724 then
Chris@1 3725 # We have reworked collect2
Chris@1 3726 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 3727 else
Chris@1 3728 # We have old collect2
Chris@1 3729 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
Chris@1 3730 # It fails to find uninstalled libraries when the uninstalled
Chris@1 3731 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@1 3732 # to unsupported forces relinking
Chris@1 3733 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 3734 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 3735 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
Chris@1 3736 fi
Chris@1 3737 esac
Chris@1 3738 shared_flag='-shared'
Chris@1 3739 if test "$aix_use_runtimelinking" = yes; then
Chris@1 3740 shared_flag="$shared_flag "'${wl}-G'
Chris@1 3741 fi
Chris@1 3742 else
Chris@1 3743 # not using gcc
Chris@1 3744 if test "$host_cpu" = ia64; then
Chris@1 3745 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@1 3746 # chokes on -Wl,-G. The following line is correct:
Chris@1 3747 shared_flag='-G'
Chris@1 3748 else
Chris@1 3749 if test "$aix_use_runtimelinking" = yes; then
Chris@1 3750 shared_flag='${wl}-G'
Chris@1 3751 else
Chris@1 3752 shared_flag='${wl}-bM:SRE'
Chris@1 3753 fi
Chris@1 3754 fi
Chris@1 3755 fi
Chris@1 3756
Chris@1 3757 # It seems that -bexpall does not export symbols beginning with
Chris@1 3758 # underscore (_), so it is better to generate a list of symbols to export.
Chris@1 3759 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
Chris@1 3760 if test "$aix_use_runtimelinking" = yes; then
Chris@1 3761 # Warning - without using the other runtime loading flags (-brtl),
Chris@1 3762 # -berok will link without error, but may produce a broken library.
Chris@1 3763 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@1 3764 # Determine the default libpath from the value encoded in an empty executable.
Chris@1 3765 _LT_AC_SYS_LIBPATH_AIX
Chris@1 3766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@1 3767
Chris@1 3768 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
Chris@1 3769 else
Chris@1 3770 if test "$host_cpu" = ia64; then
Chris@1 3771 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@1 3772 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@1 3773 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
Chris@1 3774 else
Chris@1 3775 # Determine the default libpath from the value encoded in an empty executable.
Chris@1 3776 _LT_AC_SYS_LIBPATH_AIX
Chris@1 3777 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@1 3778 # Warning - without using the other run time loading flags,
Chris@1 3779 # -berok will link without error, but may produce a broken library.
Chris@1 3780 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@1 3781 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@1 3782 # -bexpall does not export symbols beginning with underscore (_)
Chris@1 3783 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
Chris@1 3784 # Exported symbols can be pulled into shared objects from archives
Chris@1 3785 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
Chris@1 3786 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@1 3787 # This is similar to how AIX traditionally builds it's shared libraries.
Chris@1 3788 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
Chris@1 3789 fi
Chris@1 3790 fi
Chris@1 3791 ;;
Chris@1 3792 chorus*)
Chris@1 3793 case $cc_basename in
Chris@1 3794 *)
Chris@1 3795 # FIXME: insert proper C++ library support
Chris@1 3796 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3797 ;;
Chris@1 3798 esac
Chris@1 3799 ;;
Chris@1 3800
Chris@1 3801
Chris@1 3802 cygwin* | mingw* | pw32*)
Chris@1 3803 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@1 3804 # as there is no search path for DLLs.
Chris@1 3805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 3806 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 3807 _LT_AC_TAGVAR(always_export_symbols, $1)=no
Chris@1 3808 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@1 3809
Chris@1 3810 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
Chris@1 3811 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
Chris@1 3812 # If the export-symbols file already is a .def file (1st line
Chris@1 3813 # is EXPORTS), use it as is; otherwise, prepend...
Chris@1 3814 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@1 3815 cp $export_symbols $output_objdir/$soname.def;
Chris@1 3816 else
Chris@1 3817 echo EXPORTS > $output_objdir/$soname.def;
Chris@1 3818 cat $export_symbols >> $output_objdir/$soname.def;
Chris@1 3819 fi~
Chris@1 3820 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
Chris@1 3821 else
Chris@1 3822 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3823 fi
Chris@1 3824 ;;
Chris@1 3825 darwin* | rhapsody*)
Chris@1 3826 case "$host_os" in
Chris@1 3827 rhapsody* | darwin1.[[012]])
Chris@1 3828 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
Chris@1 3829 ;;
Chris@1 3830 *) # Darwin 1.3 on
Chris@1 3831 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
Chris@1 3832 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
Chris@1 3833 else
Chris@1 3834 case ${MACOSX_DEPLOYMENT_TARGET} in
Chris@1 3835 10.[[012]])
Chris@1 3836 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
Chris@1 3837 ;;
Chris@1 3838 10.*)
Chris@1 3839 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
Chris@1 3840 ;;
Chris@1 3841 esac
Chris@1 3842 fi
Chris@1 3843 ;;
Chris@1 3844 esac
Chris@1 3845 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 3846 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 3847 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
Chris@1 3848 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@1 3849 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@1 3850 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 3851
Chris@1 3852 if test "$GXX" = yes ; then
Chris@1 3853 lt_int_apple_cc_single_mod=no
Chris@1 3854 output_verbose_link_cmd='echo'
Chris@1 3855 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
Chris@1 3856 lt_int_apple_cc_single_mod=yes
Chris@1 3857 fi
Chris@1 3858 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
Chris@1 3859 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
Chris@1 3860 else
Chris@1 3861 _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'
Chris@1 3862 fi
Chris@1 3863 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
Chris@1 3864 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
Chris@1 3865 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
Chris@1 3866 _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}'
Chris@1 3867 else
Chris@1 3868 _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}'
Chris@1 3869 fi
Chris@1 3870 _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}'
Chris@1 3871 else
Chris@1 3872 case $cc_basename in
Chris@1 3873 xlc*)
Chris@1 3874 output_verbose_link_cmd='echo'
Chris@1 3875 _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'
Chris@1 3876 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
Chris@1 3877 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
Chris@1 3878 _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}'
Chris@1 3879 _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}'
Chris@1 3880 ;;
Chris@1 3881 *)
Chris@1 3882 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3883 ;;
Chris@1 3884 esac
Chris@1 3885 fi
Chris@1 3886 ;;
Chris@1 3887
Chris@1 3888 dgux*)
Chris@1 3889 case $cc_basename in
Chris@1 3890 ec++*)
Chris@1 3891 # FIXME: insert proper C++ library support
Chris@1 3892 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3893 ;;
Chris@1 3894 ghcx*)
Chris@1 3895 # Green Hills C++ Compiler
Chris@1 3896 # FIXME: insert proper C++ library support
Chris@1 3897 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3898 ;;
Chris@1 3899 *)
Chris@1 3900 # FIXME: insert proper C++ library support
Chris@1 3901 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3902 ;;
Chris@1 3903 esac
Chris@1 3904 ;;
Chris@1 3905 freebsd[[12]]*)
Chris@1 3906 # C++ shared libraries reported to be fairly broken before switch to ELF
Chris@1 3907 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3908 ;;
Chris@1 3909 freebsd-elf*)
Chris@1 3910 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 3911 ;;
Chris@1 3912 freebsd* | kfreebsd*-gnu | dragonfly*)
Chris@1 3913 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@1 3914 # conventions
Chris@1 3915 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
Chris@1 3916 ;;
Chris@1 3917 gnu*)
Chris@1 3918 ;;
Chris@1 3919 hpux9*)
Chris@1 3920 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 3921 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 3922 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 3923 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 3924 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@1 3925 # but as the default
Chris@1 3926 # location of the library.
Chris@1 3927
Chris@1 3928 case $cc_basename in
Chris@1 3929 CC*)
Chris@1 3930 # FIXME: insert proper C++ library support
Chris@1 3931 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3932 ;;
Chris@1 3933 aCC*)
Chris@1 3934 _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'
Chris@1 3935 # Commands to make compiler produce verbose output that lists
Chris@1 3936 # what "hidden" libraries, object files and flags are used when
Chris@1 3937 # linking a shared library.
Chris@1 3938 #
Chris@1 3939 # There doesn't appear to be a way to prevent this compiler from
Chris@1 3940 # explicitly linking system object files so we need to strip them
Chris@1 3941 # from the output so that they don't get included in the library
Chris@1 3942 # dependencies.
Chris@1 3943 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'
Chris@1 3944 ;;
Chris@1 3945 *)
Chris@1 3946 if test "$GXX" = yes; then
Chris@1 3947 _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'
Chris@1 3948 else
Chris@1 3949 # FIXME: insert proper C++ library support
Chris@1 3950 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3951 fi
Chris@1 3952 ;;
Chris@1 3953 esac
Chris@1 3954 ;;
Chris@1 3955 hpux10*|hpux11*)
Chris@1 3956 if test $with_gnu_ld = no; then
Chris@1 3957 case "$host_cpu" in
Chris@1 3958 hppa*64*)
Chris@1 3959 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 3960 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
Chris@1 3961 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 3962 ;;
Chris@1 3963 ia64*)
Chris@1 3964 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 3965 ;;
Chris@1 3966 *)
Chris@1 3967 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 3968 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 3969 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 3970 ;;
Chris@1 3971 esac
Chris@1 3972 fi
Chris@1 3973 case "$host_cpu" in
Chris@1 3974 hppa*64*)
Chris@1 3975 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 3976 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 3977 ;;
Chris@1 3978 ia64*)
Chris@1 3979 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 3980 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 3981 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@1 3982 # but as the default
Chris@1 3983 # location of the library.
Chris@1 3984 ;;
Chris@1 3985 *)
Chris@1 3986 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 3987 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@1 3988 # but as the default
Chris@1 3989 # location of the library.
Chris@1 3990 ;;
Chris@1 3991 esac
Chris@1 3992
Chris@1 3993 case $cc_basename in
Chris@1 3994 CC*)
Chris@1 3995 # FIXME: insert proper C++ library support
Chris@1 3996 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 3997 ;;
Chris@1 3998 aCC*)
Chris@1 3999 case "$host_cpu" in
Chris@1 4000 hppa*64*|ia64*)
Chris@1 4001 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
Chris@1 4002 ;;
Chris@1 4003 *)
Chris@1 4004 _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'
Chris@1 4005 ;;
Chris@1 4006 esac
Chris@1 4007 # Commands to make compiler produce verbose output that lists
Chris@1 4008 # what "hidden" libraries, object files and flags are used when
Chris@1 4009 # linking a shared library.
Chris@1 4010 #
Chris@1 4011 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4012 # explicitly linking system object files so we need to strip them
Chris@1 4013 # from the output so that they don't get included in the library
Chris@1 4014 # dependencies.
Chris@1 4015 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'
Chris@1 4016 ;;
Chris@1 4017 *)
Chris@1 4018 if test "$GXX" = yes; then
Chris@1 4019 if test $with_gnu_ld = no; then
Chris@1 4020 case "$host_cpu" in
Chris@1 4021 ia64*|hppa*64*)
Chris@1 4022 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
Chris@1 4023 ;;
Chris@1 4024 *)
Chris@1 4025 _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'
Chris@1 4026 ;;
Chris@1 4027 esac
Chris@1 4028 fi
Chris@1 4029 else
Chris@1 4030 # FIXME: insert proper C++ library support
Chris@1 4031 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4032 fi
Chris@1 4033 ;;
Chris@1 4034 esac
Chris@1 4035 ;;
Chris@1 4036 irix5* | irix6*)
Chris@1 4037 case $cc_basename in
Chris@1 4038 CC*)
Chris@1 4039 # SGI C++
Chris@1 4040 _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'
Chris@1 4041
Chris@1 4042 # Archives containing C++ object files must be created using
Chris@1 4043 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@1 4044 # necessary to make sure instantiated templates are included
Chris@1 4045 # in the archive.
Chris@1 4046 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@1 4047 ;;
Chris@1 4048 *)
Chris@1 4049 if test "$GXX" = yes; then
Chris@1 4050 if test "$with_gnu_ld" = no; then
Chris@1 4051 _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'
Chris@1 4052 else
Chris@1 4053 _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'
Chris@1 4054 fi
Chris@1 4055 fi
Chris@1 4056 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 4057 ;;
Chris@1 4058 esac
Chris@1 4059 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 4060 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4061 ;;
Chris@1 4062 linux*)
Chris@1 4063 case $cc_basename in
Chris@1 4064 KCC*)
Chris@1 4065 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@1 4066
Chris@1 4067 # KCC will only create a shared library if the output file
Chris@1 4068 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@1 4069 # to its proper name (with version) after linking.
Chris@1 4070 _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'
Chris@1 4071 _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'
Chris@1 4072 # Commands to make compiler produce verbose output that lists
Chris@1 4073 # what "hidden" libraries, object files and flags are used when
Chris@1 4074 # linking a shared library.
Chris@1 4075 #
Chris@1 4076 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4077 # explicitly linking system object files so we need to strip them
Chris@1 4078 # from the output so that they don't get included in the library
Chris@1 4079 # dependencies.
Chris@1 4080 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'
Chris@1 4081
Chris@1 4082 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
Chris@1 4083 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@1 4084
Chris@1 4085 # Archives containing C++ object files must be created using
Chris@1 4086 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@1 4087 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@1 4088 ;;
Chris@1 4089 icpc*)
Chris@1 4090 # Intel C++
Chris@1 4091 with_gnu_ld=yes
Chris@1 4092 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@1 4093 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@1 4094 # earlier do not add the objects themselves.
Chris@1 4095 case `$CC -V 2>&1` in
Chris@1 4096 *"Version 7."*)
Chris@1 4097 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 4098 _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'
Chris@1 4099 ;;
Chris@1 4100 *) # Version 8.0 or newer
Chris@1 4101 tmp_idyn=
Chris@1 4102 case $host_cpu in
Chris@1 4103 ia64*) tmp_idyn=' -i_dynamic';;
Chris@1 4104 esac
Chris@1 4105 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 4106 _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'
Chris@1 4107 ;;
Chris@1 4108 esac
Chris@1 4109 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 4110 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 4111 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@1 4112 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@1 4113 ;;
Chris@1 4114 pgCC*)
Chris@1 4115 # Portland Group C++ compiler
Chris@1 4116 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
Chris@1 4117 _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'
Chris@1 4118
Chris@1 4119 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
Chris@1 4120 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@1 4121 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@1 4122 ;;
Chris@1 4123 cxx*)
Chris@1 4124 # Compaq C++
Chris@1 4125 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 4126 _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'
Chris@1 4127
Chris@1 4128 runpath_var=LD_RUN_PATH
Chris@1 4129 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@1 4130 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4131
Chris@1 4132 # Commands to make compiler produce verbose output that lists
Chris@1 4133 # what "hidden" libraries, object files and flags are used when
Chris@1 4134 # linking a shared library.
Chris@1 4135 #
Chris@1 4136 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4137 # explicitly linking system object files so we need to strip them
Chris@1 4138 # from the output so that they don't get included in the library
Chris@1 4139 # dependencies.
Chris@1 4140 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'
Chris@1 4141 ;;
Chris@1 4142 esac
Chris@1 4143 ;;
Chris@1 4144 lynxos*)
Chris@1 4145 # FIXME: insert proper C++ library support
Chris@1 4146 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4147 ;;
Chris@1 4148 m88k*)
Chris@1 4149 # FIXME: insert proper C++ library support
Chris@1 4150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4151 ;;
Chris@1 4152 mvs*)
Chris@1 4153 case $cc_basename in
Chris@1 4154 cxx*)
Chris@1 4155 # FIXME: insert proper C++ library support
Chris@1 4156 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4157 ;;
Chris@1 4158 *)
Chris@1 4159 # FIXME: insert proper C++ library support
Chris@1 4160 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4161 ;;
Chris@1 4162 esac
Chris@1 4163 ;;
Chris@1 4164 netbsd*)
Chris@1 4165 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
Chris@1 4166 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@1 4167 wlarc=
Chris@1 4168 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 4169 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 4170 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 4171 fi
Chris@1 4172 # Workaround some broken pre-1.5 toolchains
Chris@1 4173 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@1 4174 ;;
Chris@1 4175 openbsd2*)
Chris@1 4176 # C++ shared libraries are fairly broken
Chris@1 4177 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4178 ;;
Chris@1 4179 openbsd*)
Chris@1 4180 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 4181 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 4182 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@1 4183 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 4184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@1 4185 _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'
Chris@1 4186 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 4187 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@1 4188 fi
Chris@1 4189 output_verbose_link_cmd='echo'
Chris@1 4190 ;;
Chris@1 4191 osf3*)
Chris@1 4192 case $cc_basename in
Chris@1 4193 KCC*)
Chris@1 4194 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@1 4195
Chris@1 4196 # KCC will only create a shared library if the output file
Chris@1 4197 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@1 4198 # to its proper name (with version) after linking.
Chris@1 4199 _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'
Chris@1 4200
Chris@1 4201 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 4202 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4203
Chris@1 4204 # Archives containing C++ object files must be created using
Chris@1 4205 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@1 4206 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@1 4207
Chris@1 4208 ;;
Chris@1 4209 RCC*)
Chris@1 4210 # Rational C++ 2.4.1
Chris@1 4211 # FIXME: insert proper C++ library support
Chris@1 4212 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4213 ;;
Chris@1 4214 cxx*)
Chris@1 4215 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@1 4216 _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'
Chris@1 4217
Chris@1 4218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 4219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4220
Chris@1 4221 # Commands to make compiler produce verbose output that lists
Chris@1 4222 # what "hidden" libraries, object files and flags are used when
Chris@1 4223 # linking a shared library.
Chris@1 4224 #
Chris@1 4225 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4226 # explicitly linking system object files so we need to strip them
Chris@1 4227 # from the output so that they don't get included in the library
Chris@1 4228 # dependencies.
Chris@1 4229 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'
Chris@1 4230 ;;
Chris@1 4231 *)
Chris@1 4232 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@1 4233 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@1 4234 _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'
Chris@1 4235
Chris@1 4236 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 4237 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4238
Chris@1 4239 # Commands to make compiler produce verbose output that lists
Chris@1 4240 # what "hidden" libraries, object files and flags are used when
Chris@1 4241 # linking a shared library.
Chris@1 4242 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
Chris@1 4243
Chris@1 4244 else
Chris@1 4245 # FIXME: insert proper C++ library support
Chris@1 4246 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4247 fi
Chris@1 4248 ;;
Chris@1 4249 esac
Chris@1 4250 ;;
Chris@1 4251 osf4* | osf5*)
Chris@1 4252 case $cc_basename in
Chris@1 4253 KCC*)
Chris@1 4254 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@1 4255
Chris@1 4256 # KCC will only create a shared library if the output file
Chris@1 4257 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@1 4258 # to its proper name (with version) after linking.
Chris@1 4259 _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'
Chris@1 4260
Chris@1 4261 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 4262 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4263
Chris@1 4264 # Archives containing C++ object files must be created using
Chris@1 4265 # the KAI C++ compiler.
Chris@1 4266 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
Chris@1 4267 ;;
Chris@1 4268 RCC*)
Chris@1 4269 # Rational C++ 2.4.1
Chris@1 4270 # FIXME: insert proper C++ library support
Chris@1 4271 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4272 ;;
Chris@1 4273 cxx*)
Chris@1 4274 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@1 4275 _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'
Chris@1 4276 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@1 4277 echo "-hidden">> $lib.exp~
Chris@1 4278 $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~
Chris@1 4279 $rm $lib.exp'
Chris@1 4280
Chris@1 4281 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@1 4282 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4283
Chris@1 4284 # Commands to make compiler produce verbose output that lists
Chris@1 4285 # what "hidden" libraries, object files and flags are used when
Chris@1 4286 # linking a shared library.
Chris@1 4287 #
Chris@1 4288 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4289 # explicitly linking system object files so we need to strip them
Chris@1 4290 # from the output so that they don't get included in the library
Chris@1 4291 # dependencies.
Chris@1 4292 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'
Chris@1 4293 ;;
Chris@1 4294 *)
Chris@1 4295 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@1 4296 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@1 4297 _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'
Chris@1 4298
Chris@1 4299 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 4300 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 4301
Chris@1 4302 # Commands to make compiler produce verbose output that lists
Chris@1 4303 # what "hidden" libraries, object files and flags are used when
Chris@1 4304 # linking a shared library.
Chris@1 4305 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
Chris@1 4306
Chris@1 4307 else
Chris@1 4308 # FIXME: insert proper C++ library support
Chris@1 4309 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4310 fi
Chris@1 4311 ;;
Chris@1 4312 esac
Chris@1 4313 ;;
Chris@1 4314 psos*)
Chris@1 4315 # FIXME: insert proper C++ library support
Chris@1 4316 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4317 ;;
Chris@1 4318 sco*)
Chris@1 4319 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 4320 case $cc_basename in
Chris@1 4321 CC*)
Chris@1 4322 # FIXME: insert proper C++ library support
Chris@1 4323 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4324 ;;
Chris@1 4325 *)
Chris@1 4326 # FIXME: insert proper C++ library support
Chris@1 4327 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4328 ;;
Chris@1 4329 esac
Chris@1 4330 ;;
Chris@1 4331 sunos4*)
Chris@1 4332 case $cc_basename in
Chris@1 4333 CC*)
Chris@1 4334 # Sun C++ 4.x
Chris@1 4335 # FIXME: insert proper C++ library support
Chris@1 4336 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4337 ;;
Chris@1 4338 lcc*)
Chris@1 4339 # Lucid
Chris@1 4340 # FIXME: insert proper C++ library support
Chris@1 4341 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4342 ;;
Chris@1 4343 *)
Chris@1 4344 # FIXME: insert proper C++ library support
Chris@1 4345 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4346 ;;
Chris@1 4347 esac
Chris@1 4348 ;;
Chris@1 4349 solaris*)
Chris@1 4350 case $cc_basename in
Chris@1 4351 CC*)
Chris@1 4352 # Sun C++ 4.2, 5.x and Centerline C++
Chris@1 4353 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@1 4354 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@1 4355 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 4356 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
Chris@1 4357
Chris@1 4358 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 4359 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 4360 case $host_os in
Chris@1 4361 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@1 4362 *)
Chris@1 4363 # The C++ compiler is used as linker so we must use $wl
Chris@1 4364 # flag to pass the commands to the underlying system
Chris@1 4365 # linker. We must also pass each convience library through
Chris@1 4366 # to the system linker between allextract/defaultextract.
Chris@1 4367 # The C++ compiler will combine linker options so we
Chris@1 4368 # cannot just pass the convience library names through
Chris@1 4369 # without $wl.
Chris@1 4370 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@1 4371 _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'
Chris@1 4372 ;;
Chris@1 4373 esac
Chris@1 4374 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 4375
Chris@1 4376 # Commands to make compiler produce verbose output that lists
Chris@1 4377 # what "hidden" libraries, object files and flags are used when
Chris@1 4378 # linking a shared library.
Chris@1 4379 #
Chris@1 4380 # There doesn't appear to be a way to prevent this compiler from
Chris@1 4381 # explicitly linking system object files so we need to strip them
Chris@1 4382 # from the output so that they don't get included in the library
Chris@1 4383 # dependencies.
Chris@1 4384 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
Chris@1 4385
Chris@1 4386 # Archives containing C++ object files must be created using
Chris@1 4387 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@1 4388 # necessary to make sure instantiated templates are included
Chris@1 4389 # in the archive.
Chris@1 4390 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@1 4391 ;;
Chris@1 4392 gcx*)
Chris@1 4393 # Green Hills C++ Compiler
Chris@1 4394 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@1 4395
Chris@1 4396 # The C++ compiler must be used to create the archive.
Chris@1 4397 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@1 4398 ;;
Chris@1 4399 *)
Chris@1 4400 # GNU C++ compiler with Solaris linker
Chris@1 4401 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@1 4402 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
Chris@1 4403 if $CC --version | grep -v '^2\.7' > /dev/null; then
Chris@1 4404 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@1 4405 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 4406 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
Chris@1 4407
Chris@1 4408 # Commands to make compiler produce verbose output that lists
Chris@1 4409 # what "hidden" libraries, object files and flags are used when
Chris@1 4410 # linking a shared library.
Chris@1 4411 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
Chris@1 4412 else
Chris@1 4413 # g++ 2.7 appears to require `-G' NOT `-shared' on this
Chris@1 4414 # platform.
Chris@1 4415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@1 4416 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 4417 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
Chris@1 4418
Chris@1 4419 # Commands to make compiler produce verbose output that lists
Chris@1 4420 # what "hidden" libraries, object files and flags are used when
Chris@1 4421 # linking a shared library.
Chris@1 4422 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
Chris@1 4423 fi
Chris@1 4424
Chris@1 4425 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
Chris@1 4426 fi
Chris@1 4427 ;;
Chris@1 4428 esac
Chris@1 4429 ;;
Chris@1 4430 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
Chris@1 4431 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 4432 ;;
Chris@1 4433 tandem*)
Chris@1 4434 case $cc_basename in
Chris@1 4435 NCC*)
Chris@1 4436 # NonStop-UX NCC 3.20
Chris@1 4437 # FIXME: insert proper C++ library support
Chris@1 4438 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4439 ;;
Chris@1 4440 *)
Chris@1 4441 # FIXME: insert proper C++ library support
Chris@1 4442 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4443 ;;
Chris@1 4444 esac
Chris@1 4445 ;;
Chris@1 4446 vxworks*)
Chris@1 4447 # FIXME: insert proper C++ library support
Chris@1 4448 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4449 ;;
Chris@1 4450 *)
Chris@1 4451 # FIXME: insert proper C++ library support
Chris@1 4452 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 4453 ;;
Chris@1 4454 esac
Chris@1 4455 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
Chris@1 4456 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@1 4457
Chris@1 4458 _LT_AC_TAGVAR(GCC, $1)="$GXX"
Chris@1 4459 _LT_AC_TAGVAR(LD, $1)="$LD"
Chris@1 4460
Chris@1 4461 AC_LIBTOOL_POSTDEP_PREDEP($1)
Chris@1 4462 AC_LIBTOOL_PROG_COMPILER_PIC($1)
Chris@1 4463 AC_LIBTOOL_PROG_CC_C_O($1)
Chris@1 4464 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
Chris@1 4465 AC_LIBTOOL_PROG_LD_SHLIBS($1)
Chris@1 4466 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
Chris@1 4467 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
Chris@1 4468 AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 4469 AC_LIBTOOL_DLOPEN_SELF($1)
Chris@1 4470
Chris@1 4471 AC_LIBTOOL_CONFIG($1)
Chris@1 4472
Chris@1 4473 AC_LANG_POP
Chris@1 4474 CC=$lt_save_CC
Chris@1 4475 LDCXX=$LD
Chris@1 4476 LD=$lt_save_LD
Chris@1 4477 GCC=$lt_save_GCC
Chris@1 4478 with_gnu_ldcxx=$with_gnu_ld
Chris@1 4479 with_gnu_ld=$lt_save_with_gnu_ld
Chris@1 4480 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@1 4481 lt_cv_path_LD=$lt_save_path_LD
Chris@1 4482 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@1 4483 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@1 4484 ])# AC_LIBTOOL_LANG_CXX_CONFIG
Chris@1 4485
Chris@1 4486 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
Chris@1 4487 # ------------------------
Chris@1 4488 # Figure out "hidden" library dependencies from verbose
Chris@1 4489 # compiler output when linking a shared library.
Chris@1 4490 # Parse the compiler output and extract the necessary
Chris@1 4491 # objects, libraries and library flags.
Chris@1 4492 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
Chris@1 4493 dnl we can't use the lt_simple_compile_test_code here,
Chris@1 4494 dnl because it contains code intended for an executable,
Chris@1 4495 dnl not a library. It's possible we should let each
Chris@1 4496 dnl tag define a new lt_????_link_test_code variable,
Chris@1 4497 dnl but it's only used here...
Chris@1 4498 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
Chris@1 4499 int a;
Chris@1 4500 void foo (void) { a = 0; }
Chris@1 4501 EOF
Chris@1 4502 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
Chris@1 4503 class Foo
Chris@1 4504 {
Chris@1 4505 public:
Chris@1 4506 Foo (void) { a = 0; }
Chris@1 4507 private:
Chris@1 4508 int a;
Chris@1 4509 };
Chris@1 4510 EOF
Chris@1 4511 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
Chris@1 4512 subroutine foo
Chris@1 4513 implicit none
Chris@1 4514 integer*4 a
Chris@1 4515 a=0
Chris@1 4516 return
Chris@1 4517 end
Chris@1 4518 EOF
Chris@1 4519 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
Chris@1 4520 public class foo {
Chris@1 4521 private int a;
Chris@1 4522 public void bar (void) {
Chris@1 4523 a = 0;
Chris@1 4524 }
Chris@1 4525 };
Chris@1 4526 EOF
Chris@1 4527 ])
Chris@1 4528 dnl Parse the compiler output and extract the necessary
Chris@1 4529 dnl objects, libraries and library flags.
Chris@1 4530 if AC_TRY_EVAL(ac_compile); then
Chris@1 4531 # Parse the compiler output and extract the necessary
Chris@1 4532 # objects, libraries and library flags.
Chris@1 4533
Chris@1 4534 # Sentinel used to keep track of whether or not we are before
Chris@1 4535 # the conftest object file.
Chris@1 4536 pre_test_object_deps_done=no
Chris@1 4537
Chris@1 4538 # The `*' in the case matches for architectures that use `case' in
Chris@1 4539 # $output_verbose_cmd can trigger glob expansion during the loop
Chris@1 4540 # eval without this substitution.
Chris@1 4541 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
Chris@1 4542
Chris@1 4543 for p in `eval $output_verbose_link_cmd`; do
Chris@1 4544 case $p in
Chris@1 4545
Chris@1 4546 -L* | -R* | -l*)
Chris@1 4547 # Some compilers place space between "-{L,R}" and the path.
Chris@1 4548 # Remove the space.
Chris@1 4549 if test $p = "-L" \
Chris@1 4550 || test $p = "-R"; then
Chris@1 4551 prev=$p
Chris@1 4552 continue
Chris@1 4553 else
Chris@1 4554 prev=
Chris@1 4555 fi
Chris@1 4556
Chris@1 4557 if test "$pre_test_object_deps_done" = no; then
Chris@1 4558 case $p in
Chris@1 4559 -L* | -R*)
Chris@1 4560 # Internal compiler library paths should come after those
Chris@1 4561 # provided the user. The postdeps already come after the
Chris@1 4562 # user supplied libs so there is no need to process them.
Chris@1 4563 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@1 4564 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
Chris@1 4565 else
Chris@1 4566 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
Chris@1 4567 fi
Chris@1 4568 ;;
Chris@1 4569 # The "-l" case would never come before the object being
Chris@1 4570 # linked, so don't bother handling this case.
Chris@1 4571 esac
Chris@1 4572 else
Chris@1 4573 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
Chris@1 4574 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
Chris@1 4575 else
Chris@1 4576 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
Chris@1 4577 fi
Chris@1 4578 fi
Chris@1 4579 ;;
Chris@1 4580
Chris@1 4581 *.$objext)
Chris@1 4582 # This assumes that the test object file only shows up
Chris@1 4583 # once in the compiler output.
Chris@1 4584 if test "$p" = "conftest.$objext"; then
Chris@1 4585 pre_test_object_deps_done=yes
Chris@1 4586 continue
Chris@1 4587 fi
Chris@1 4588
Chris@1 4589 if test "$pre_test_object_deps_done" = no; then
Chris@1 4590 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
Chris@1 4591 _LT_AC_TAGVAR(predep_objects, $1)="$p"
Chris@1 4592 else
Chris@1 4593 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
Chris@1 4594 fi
Chris@1 4595 else
Chris@1 4596 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
Chris@1 4597 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
Chris@1 4598 else
Chris@1 4599 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
Chris@1 4600 fi
Chris@1 4601 fi
Chris@1 4602 ;;
Chris@1 4603
Chris@1 4604 *) ;; # Ignore the rest.
Chris@1 4605
Chris@1 4606 esac
Chris@1 4607 done
Chris@1 4608
Chris@1 4609 # Clean up.
Chris@1 4610 rm -f a.out a.exe
Chris@1 4611 else
Chris@1 4612 echo "libtool.m4: error: problem compiling $1 test program"
Chris@1 4613 fi
Chris@1 4614
Chris@1 4615 $rm -f confest.$objext
Chris@1 4616
Chris@1 4617 case " $_LT_AC_TAGVAR(postdeps, $1) " in
Chris@1 4618 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@1 4619 esac
Chris@1 4620 ])# AC_LIBTOOL_POSTDEP_PREDEP
Chris@1 4621
Chris@1 4622 # AC_LIBTOOL_LANG_F77_CONFIG
Chris@1 4623 # ------------------------
Chris@1 4624 # Ensure that the configuration vars for the C compiler are
Chris@1 4625 # suitably defined. Those variables are subsequently used by
Chris@1 4626 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Chris@1 4627 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
Chris@1 4628 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
Chris@1 4629 [AC_REQUIRE([AC_PROG_F77])
Chris@1 4630 AC_LANG_PUSH(Fortran 77)
Chris@1 4631
Chris@1 4632 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 4633 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
Chris@1 4634 _LT_AC_TAGVAR(always_export_symbols, $1)=no
Chris@1 4635 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
Chris@1 4636 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@1 4637 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 4638 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@1 4639 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
Chris@1 4640 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
Chris@1 4641 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
Chris@1 4642 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
Chris@1 4643 _LT_AC_TAGVAR(module_cmds, $1)=
Chris@1 4644 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
Chris@1 4645 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
Chris@1 4646 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@1 4647 _LT_AC_TAGVAR(no_undefined_flag, $1)=
Chris@1 4648 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 4649 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@1 4650
Chris@1 4651 # Source file extension for f77 test sources.
Chris@1 4652 ac_ext=f
Chris@1 4653
Chris@1 4654 # Object file extension for compiled f77 test sources.
Chris@1 4655 objext=o
Chris@1 4656 _LT_AC_TAGVAR(objext, $1)=$objext
Chris@1 4657
Chris@1 4658 # Code to be used in simple compile tests
Chris@1 4659 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
Chris@1 4660
Chris@1 4661 # Code to be used in simple link tests
Chris@1 4662 lt_simple_link_test_code=" program t\n end\n"
Chris@1 4663
Chris@1 4664 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@1 4665 _LT_AC_SYS_COMPILER
Chris@1 4666
Chris@1 4667 # save warnings/boilerplate of simple test code
Chris@1 4668 _LT_COMPILER_BOILERPLATE
Chris@1 4669 _LT_LINKER_BOILERPLATE
Chris@1 4670
Chris@1 4671 # Allow CC to be a program name with arguments.
Chris@1 4672 lt_save_CC="$CC"
Chris@1 4673 CC=${F77-"f77"}
Chris@1 4674 compiler=$CC
Chris@1 4675 _LT_AC_TAGVAR(compiler, $1)=$CC
Chris@1 4676 _LT_CC_BASENAME([$compiler])
Chris@1 4677
Chris@1 4678 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@1 4679 AC_MSG_RESULT([$can_build_shared])
Chris@1 4680
Chris@1 4681 AC_MSG_CHECKING([whether to build shared libraries])
Chris@1 4682 test "$can_build_shared" = "no" && enable_shared=no
Chris@1 4683
Chris@1 4684 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@1 4685 # are all built from PIC.
Chris@1 4686 case "$host_os" in
Chris@1 4687 aix3*)
Chris@1 4688 test "$enable_shared" = yes && enable_static=no
Chris@1 4689 if test -n "$RANLIB"; then
Chris@1 4690 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@1 4691 postinstall_cmds='$RANLIB $lib'
Chris@1 4692 fi
Chris@1 4693 ;;
Chris@1 4694 aix4* | aix5*)
Chris@1 4695 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@1 4696 test "$enable_shared" = yes && enable_static=no
Chris@1 4697 fi
Chris@1 4698 ;;
Chris@1 4699 esac
Chris@1 4700 AC_MSG_RESULT([$enable_shared])
Chris@1 4701
Chris@1 4702 AC_MSG_CHECKING([whether to build static libraries])
Chris@1 4703 # Make sure either enable_shared or enable_static is yes.
Chris@1 4704 test "$enable_shared" = yes || enable_static=yes
Chris@1 4705 AC_MSG_RESULT([$enable_static])
Chris@1 4706
Chris@1 4707 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@1 4708
Chris@1 4709 _LT_AC_TAGVAR(GCC, $1)="$G77"
Chris@1 4710 _LT_AC_TAGVAR(LD, $1)="$LD"
Chris@1 4711
Chris@1 4712 AC_LIBTOOL_PROG_COMPILER_PIC($1)
Chris@1 4713 AC_LIBTOOL_PROG_CC_C_O($1)
Chris@1 4714 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
Chris@1 4715 AC_LIBTOOL_PROG_LD_SHLIBS($1)
Chris@1 4716 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
Chris@1 4717 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
Chris@1 4718 AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 4719
Chris@1 4720
Chris@1 4721 AC_LIBTOOL_CONFIG($1)
Chris@1 4722
Chris@1 4723 AC_LANG_POP
Chris@1 4724 CC="$lt_save_CC"
Chris@1 4725 ])# AC_LIBTOOL_LANG_F77_CONFIG
Chris@1 4726
Chris@1 4727
Chris@1 4728 # AC_LIBTOOL_LANG_GCJ_CONFIG
Chris@1 4729 # --------------------------
Chris@1 4730 # Ensure that the configuration vars for the C compiler are
Chris@1 4731 # suitably defined. Those variables are subsequently used by
Chris@1 4732 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Chris@1 4733 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
Chris@1 4734 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
Chris@1 4735 [AC_LANG_SAVE
Chris@1 4736
Chris@1 4737 # Source file extension for Java test sources.
Chris@1 4738 ac_ext=java
Chris@1 4739
Chris@1 4740 # Object file extension for compiled Java test sources.
Chris@1 4741 objext=o
Chris@1 4742 _LT_AC_TAGVAR(objext, $1)=$objext
Chris@1 4743
Chris@1 4744 # Code to be used in simple compile tests
Chris@1 4745 lt_simple_compile_test_code="class foo {}\n"
Chris@1 4746
Chris@1 4747 # Code to be used in simple link tests
Chris@1 4748 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
Chris@1 4749
Chris@1 4750 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@1 4751 _LT_AC_SYS_COMPILER
Chris@1 4752
Chris@1 4753 # save warnings/boilerplate of simple test code
Chris@1 4754 _LT_COMPILER_BOILERPLATE
Chris@1 4755 _LT_LINKER_BOILERPLATE
Chris@1 4756
Chris@1 4757 # Allow CC to be a program name with arguments.
Chris@1 4758 lt_save_CC="$CC"
Chris@1 4759 CC=${GCJ-"gcj"}
Chris@1 4760 compiler=$CC
Chris@1 4761 _LT_AC_TAGVAR(compiler, $1)=$CC
Chris@1 4762 _LT_CC_BASENAME([$compiler])
Chris@1 4763
Chris@1 4764 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@1 4765 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 4766
Chris@1 4767 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@1 4768
Chris@1 4769 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
Chris@1 4770 AC_LIBTOOL_PROG_COMPILER_PIC($1)
Chris@1 4771 AC_LIBTOOL_PROG_CC_C_O($1)
Chris@1 4772 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
Chris@1 4773 AC_LIBTOOL_PROG_LD_SHLIBS($1)
Chris@1 4774 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
Chris@1 4775 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
Chris@1 4776 AC_LIBTOOL_SYS_LIB_STRIP
Chris@1 4777 AC_LIBTOOL_DLOPEN_SELF($1)
Chris@1 4778
Chris@1 4779 AC_LIBTOOL_CONFIG($1)
Chris@1 4780
Chris@1 4781 AC_LANG_RESTORE
Chris@1 4782 CC="$lt_save_CC"
Chris@1 4783 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
Chris@1 4784
Chris@1 4785
Chris@1 4786 # AC_LIBTOOL_LANG_RC_CONFIG
Chris@1 4787 # --------------------------
Chris@1 4788 # Ensure that the configuration vars for the Windows resource compiler are
Chris@1 4789 # suitably defined. Those variables are subsequently used by
Chris@1 4790 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
Chris@1 4791 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
Chris@1 4792 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
Chris@1 4793 [AC_LANG_SAVE
Chris@1 4794
Chris@1 4795 # Source file extension for RC test sources.
Chris@1 4796 ac_ext=rc
Chris@1 4797
Chris@1 4798 # Object file extension for compiled RC test sources.
Chris@1 4799 objext=o
Chris@1 4800 _LT_AC_TAGVAR(objext, $1)=$objext
Chris@1 4801
Chris@1 4802 # Code to be used in simple compile tests
Chris@1 4803 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
Chris@1 4804
Chris@1 4805 # Code to be used in simple link tests
Chris@1 4806 lt_simple_link_test_code="$lt_simple_compile_test_code"
Chris@1 4807
Chris@1 4808 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@1 4809 _LT_AC_SYS_COMPILER
Chris@1 4810
Chris@1 4811 # save warnings/boilerplate of simple test code
Chris@1 4812 _LT_COMPILER_BOILERPLATE
Chris@1 4813 _LT_LINKER_BOILERPLATE
Chris@1 4814
Chris@1 4815 # Allow CC to be a program name with arguments.
Chris@1 4816 lt_save_CC="$CC"
Chris@1 4817 CC=${RC-"windres"}
Chris@1 4818 compiler=$CC
Chris@1 4819 _LT_AC_TAGVAR(compiler, $1)=$CC
Chris@1 4820 _LT_CC_BASENAME([$compiler])
Chris@1 4821 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@1 4822
Chris@1 4823 AC_LIBTOOL_CONFIG($1)
Chris@1 4824
Chris@1 4825 AC_LANG_RESTORE
Chris@1 4826 CC="$lt_save_CC"
Chris@1 4827 ])# AC_LIBTOOL_LANG_RC_CONFIG
Chris@1 4828
Chris@1 4829
Chris@1 4830 # AC_LIBTOOL_CONFIG([TAGNAME])
Chris@1 4831 # ----------------------------
Chris@1 4832 # If TAGNAME is not passed, then create an initial libtool script
Chris@1 4833 # with a default configuration from the untagged config vars. Otherwise
Chris@1 4834 # add code to config.status for appending the configuration named by
Chris@1 4835 # TAGNAME from the matching tagged config vars.
Chris@1 4836 AC_DEFUN([AC_LIBTOOL_CONFIG],
Chris@1 4837 [# The else clause should only fire when bootstrapping the
Chris@1 4838 # libtool distribution, otherwise you forgot to ship ltmain.sh
Chris@1 4839 # with your package, and you will get complaints that there are
Chris@1 4840 # no rules to generate ltmain.sh.
Chris@1 4841 if test -f "$ltmain"; then
Chris@1 4842 # See if we are running on zsh, and set the options which allow our commands through
Chris@1 4843 # without removal of \ escapes.
Chris@1 4844 if test -n "${ZSH_VERSION+set}" ; then
Chris@1 4845 setopt NO_GLOB_SUBST
Chris@1 4846 fi
Chris@1 4847 # Now quote all the things that may contain metacharacters while being
Chris@1 4848 # careful not to overquote the AC_SUBSTed values. We take copies of the
Chris@1 4849 # variables and quote the copies for generation of the libtool script.
Chris@1 4850 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
Chris@1 4851 SED SHELL STRIP \
Chris@1 4852 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
Chris@1 4853 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
Chris@1 4854 deplibs_check_method reload_flag reload_cmds need_locks \
Chris@1 4855 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
Chris@1 4856 lt_cv_sys_global_symbol_to_c_name_address \
Chris@1 4857 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
Chris@1 4858 old_postinstall_cmds old_postuninstall_cmds \
Chris@1 4859 _LT_AC_TAGVAR(compiler, $1) \
Chris@1 4860 _LT_AC_TAGVAR(CC, $1) \
Chris@1 4861 _LT_AC_TAGVAR(LD, $1) \
Chris@1 4862 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
Chris@1 4863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
Chris@1 4864 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
Chris@1 4865 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
Chris@1 4866 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
Chris@1 4867 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
Chris@1 4868 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
Chris@1 4869 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
Chris@1 4870 _LT_AC_TAGVAR(old_archive_cmds, $1) \
Chris@1 4871 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
Chris@1 4872 _LT_AC_TAGVAR(predep_objects, $1) \
Chris@1 4873 _LT_AC_TAGVAR(postdep_objects, $1) \
Chris@1 4874 _LT_AC_TAGVAR(predeps, $1) \
Chris@1 4875 _LT_AC_TAGVAR(postdeps, $1) \
Chris@1 4876 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
Chris@1 4877 _LT_AC_TAGVAR(archive_cmds, $1) \
Chris@1 4878 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
Chris@1 4879 _LT_AC_TAGVAR(postinstall_cmds, $1) \
Chris@1 4880 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
Chris@1 4881 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
Chris@1 4882 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
Chris@1 4883 _LT_AC_TAGVAR(no_undefined_flag, $1) \
Chris@1 4884 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
Chris@1 4885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
Chris@1 4886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
Chris@1 4887 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
Chris@1 4888 _LT_AC_TAGVAR(hardcode_automatic, $1) \
Chris@1 4889 _LT_AC_TAGVAR(module_cmds, $1) \
Chris@1 4890 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
Chris@1 4891 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
Chris@1 4892 _LT_AC_TAGVAR(exclude_expsyms, $1) \
Chris@1 4893 _LT_AC_TAGVAR(include_expsyms, $1); do
Chris@1 4894
Chris@1 4895 case $var in
Chris@1 4896 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
Chris@1 4897 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
Chris@1 4898 _LT_AC_TAGVAR(archive_cmds, $1) | \
Chris@1 4899 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
Chris@1 4900 _LT_AC_TAGVAR(module_cmds, $1) | \
Chris@1 4901 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
Chris@1 4902 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
Chris@1 4903 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
Chris@1 4904 extract_expsyms_cmds | reload_cmds | finish_cmds | \
Chris@1 4905 postinstall_cmds | postuninstall_cmds | \
Chris@1 4906 old_postinstall_cmds | old_postuninstall_cmds | \
Chris@1 4907 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
Chris@1 4908 # Double-quote double-evaled strings.
Chris@1 4909 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
Chris@1 4910 ;;
Chris@1 4911 *)
Chris@1 4912 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
Chris@1 4913 ;;
Chris@1 4914 esac
Chris@1 4915 done
Chris@1 4916
Chris@1 4917 case $lt_echo in
Chris@1 4918 *'\[$]0 --fallback-echo"')
Chris@1 4919 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
Chris@1 4920 ;;
Chris@1 4921 esac
Chris@1 4922
Chris@1 4923 ifelse([$1], [],
Chris@1 4924 [cfgfile="${ofile}T"
Chris@1 4925 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
Chris@1 4926 $rm -f "$cfgfile"
Chris@1 4927 AC_MSG_NOTICE([creating $ofile])],
Chris@1 4928 [cfgfile="$ofile"])
Chris@1 4929
Chris@1 4930 cat <<__EOF__ >> "$cfgfile"
Chris@1 4931 ifelse([$1], [],
Chris@1 4932 [#! $SHELL
Chris@1 4933
Chris@1 4934 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
Chris@1 4935 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
Chris@1 4936 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@1 4937 #
Chris@1 4938 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
Chris@1 4939 # Free Software Foundation, Inc.
Chris@1 4940 #
Chris@1 4941 # This file is part of GNU Libtool:
Chris@1 4942 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
Chris@1 4943 #
Chris@1 4944 # This program is free software; you can redistribute it and/or modify
Chris@1 4945 # it under the terms of the GNU General Public License as published by
Chris@1 4946 # the Free Software Foundation; either version 2 of the License, or
Chris@1 4947 # (at your option) any later version.
Chris@1 4948 #
Chris@1 4949 # This program is distributed in the hope that it will be useful, but
Chris@1 4950 # WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 4951 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Chris@1 4952 # General Public License for more details.
Chris@1 4953 #
Chris@1 4954 # You should have received a copy of the GNU General Public License
Chris@1 4955 # along with this program; if not, write to the Free Software
Chris@1 4956 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Chris@1 4957 #
Chris@1 4958 # As a special exception to the GNU General Public License, if you
Chris@1 4959 # distribute this file as part of a program that contains a
Chris@1 4960 # configuration script generated by Autoconf, you may include it under
Chris@1 4961 # the same distribution terms that you use for the rest of that program.
Chris@1 4962
Chris@1 4963 # A sed program that does not truncate output.
Chris@1 4964 SED=$lt_SED
Chris@1 4965
Chris@1 4966 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
Chris@1 4967 Xsed="$SED -e 1s/^X//"
Chris@1 4968
Chris@1 4969 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@1 4970 # if CDPATH is set.
Chris@1 4971 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@1 4972
Chris@1 4973 # The names of the tagged configurations supported by this script.
Chris@1 4974 available_tags=
Chris@1 4975
Chris@1 4976 # ### BEGIN LIBTOOL CONFIG],
Chris@1 4977 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
Chris@1 4978
Chris@1 4979 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Chris@1 4980
Chris@1 4981 # Shell to use when invoking shell scripts.
Chris@1 4982 SHELL=$lt_SHELL
Chris@1 4983
Chris@1 4984 # Whether or not to build shared libraries.
Chris@1 4985 build_libtool_libs=$enable_shared
Chris@1 4986
Chris@1 4987 # Whether or not to build static libraries.
Chris@1 4988 build_old_libs=$enable_static
Chris@1 4989
Chris@1 4990 # Whether or not to add -lc for building shared libraries.
Chris@1 4991 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
Chris@1 4992
Chris@1 4993 # Whether or not to disallow shared libs when runtime libs are static
Chris@1 4994 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
Chris@1 4995
Chris@1 4996 # Whether or not to optimize for fast installation.
Chris@1 4997 fast_install=$enable_fast_install
Chris@1 4998
Chris@1 4999 # The host system.
Chris@1 5000 host_alias=$host_alias
Chris@1 5001 host=$host
Chris@1 5002 host_os=$host_os
Chris@1 5003
Chris@1 5004 # The build system.
Chris@1 5005 build_alias=$build_alias
Chris@1 5006 build=$build
Chris@1 5007 build_os=$build_os
Chris@1 5008
Chris@1 5009 # An echo program that does not interpret backslashes.
Chris@1 5010 echo=$lt_echo
Chris@1 5011
Chris@1 5012 # The archiver.
Chris@1 5013 AR=$lt_AR
Chris@1 5014 AR_FLAGS=$lt_AR_FLAGS
Chris@1 5015
Chris@1 5016 # A C compiler.
Chris@1 5017 LTCC=$lt_LTCC
Chris@1 5018
Chris@1 5019 # A language-specific compiler.
Chris@1 5020 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
Chris@1 5021
Chris@1 5022 # Is the compiler the GNU C compiler?
Chris@1 5023 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
Chris@1 5024
Chris@1 5025 # An ERE matcher.
Chris@1 5026 EGREP=$lt_EGREP
Chris@1 5027
Chris@1 5028 # The linker used to build libraries.
Chris@1 5029 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
Chris@1 5030
Chris@1 5031 # Whether we need hard or soft links.
Chris@1 5032 LN_S=$lt_LN_S
Chris@1 5033
Chris@1 5034 # A BSD-compatible nm program.
Chris@1 5035 NM=$lt_NM
Chris@1 5036
Chris@1 5037 # A symbol stripping program
Chris@1 5038 STRIP=$lt_STRIP
Chris@1 5039
Chris@1 5040 # Used to examine libraries when file_magic_cmd begins "file"
Chris@1 5041 MAGIC_CMD=$MAGIC_CMD
Chris@1 5042
Chris@1 5043 # Used on cygwin: DLL creation program.
Chris@1 5044 DLLTOOL="$DLLTOOL"
Chris@1 5045
Chris@1 5046 # Used on cygwin: object dumper.
Chris@1 5047 OBJDUMP="$OBJDUMP"
Chris@1 5048
Chris@1 5049 # Used on cygwin: assembler.
Chris@1 5050 AS="$AS"
Chris@1 5051
Chris@1 5052 # The name of the directory that contains temporary libtool files.
Chris@1 5053 objdir=$objdir
Chris@1 5054
Chris@1 5055 # How to create reloadable object files.
Chris@1 5056 reload_flag=$lt_reload_flag
Chris@1 5057 reload_cmds=$lt_reload_cmds
Chris@1 5058
Chris@1 5059 # How to pass a linker flag through the compiler.
Chris@1 5060 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
Chris@1 5061
Chris@1 5062 # Object file suffix (normally "o").
Chris@1 5063 objext="$ac_objext"
Chris@1 5064
Chris@1 5065 # Old archive suffix (normally "a").
Chris@1 5066 libext="$libext"
Chris@1 5067
Chris@1 5068 # Shared library suffix (normally ".so").
Chris@1 5069 shrext_cmds='$shrext_cmds'
Chris@1 5070
Chris@1 5071 # Executable file suffix (normally "").
Chris@1 5072 exeext="$exeext"
Chris@1 5073
Chris@1 5074 # Additional compiler flags for building library objects.
Chris@1 5075 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
Chris@1 5076 pic_mode=$pic_mode
Chris@1 5077
Chris@1 5078 # What is the maximum length of a command?
Chris@1 5079 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@1 5080
Chris@1 5081 # Does compiler simultaneously support -c and -o options?
Chris@1 5082 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
Chris@1 5083
Chris@1 5084 # Must we lock files when doing compilation?
Chris@1 5085 need_locks=$lt_need_locks
Chris@1 5086
Chris@1 5087 # Do we need the lib prefix for modules?
Chris@1 5088 need_lib_prefix=$need_lib_prefix
Chris@1 5089
Chris@1 5090 # Do we need a version for libraries?
Chris@1 5091 need_version=$need_version
Chris@1 5092
Chris@1 5093 # Whether dlopen is supported.
Chris@1 5094 dlopen_support=$enable_dlopen
Chris@1 5095
Chris@1 5096 # Whether dlopen of programs is supported.
Chris@1 5097 dlopen_self=$enable_dlopen_self
Chris@1 5098
Chris@1 5099 # Whether dlopen of statically linked programs is supported.
Chris@1 5100 dlopen_self_static=$enable_dlopen_self_static
Chris@1 5101
Chris@1 5102 # Compiler flag to prevent dynamic linking.
Chris@1 5103 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
Chris@1 5104
Chris@1 5105 # Compiler flag to turn off builtin functions.
Chris@1 5106 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
Chris@1 5107
Chris@1 5108 # Compiler flag to allow reflexive dlopens.
Chris@1 5109 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
Chris@1 5110
Chris@1 5111 # Compiler flag to generate shared objects directly from archives.
Chris@1 5112 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
Chris@1 5113
Chris@1 5114 # Compiler flag to generate thread-safe objects.
Chris@1 5115 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
Chris@1 5116
Chris@1 5117 # Library versioning type.
Chris@1 5118 version_type=$version_type
Chris@1 5119
Chris@1 5120 # Format of library name prefix.
Chris@1 5121 libname_spec=$lt_libname_spec
Chris@1 5122
Chris@1 5123 # List of archive names. First name is the real one, the rest are links.
Chris@1 5124 # The last name is the one that the linker finds with -lNAME.
Chris@1 5125 library_names_spec=$lt_library_names_spec
Chris@1 5126
Chris@1 5127 # The coded name of the library, if different from the real name.
Chris@1 5128 soname_spec=$lt_soname_spec
Chris@1 5129
Chris@1 5130 # Commands used to build and install an old-style archive.
Chris@1 5131 RANLIB=$lt_RANLIB
Chris@1 5132 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
Chris@1 5133 old_postinstall_cmds=$lt_old_postinstall_cmds
Chris@1 5134 old_postuninstall_cmds=$lt_old_postuninstall_cmds
Chris@1 5135
Chris@1 5136 # Create an old-style archive from a shared archive.
Chris@1 5137 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
Chris@1 5138
Chris@1 5139 # Create a temporary old-style archive to link instead of a shared archive.
Chris@1 5140 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
Chris@1 5141
Chris@1 5142 # Commands used to build and install a shared archive.
Chris@1 5143 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
Chris@1 5144 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
Chris@1 5145 postinstall_cmds=$lt_postinstall_cmds
Chris@1 5146 postuninstall_cmds=$lt_postuninstall_cmds
Chris@1 5147
Chris@1 5148 # Commands used to build a loadable module (assumed same as above if empty)
Chris@1 5149 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
Chris@1 5150 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
Chris@1 5151
Chris@1 5152 # Commands to strip libraries.
Chris@1 5153 old_striplib=$lt_old_striplib
Chris@1 5154 striplib=$lt_striplib
Chris@1 5155
Chris@1 5156 # Dependencies to place before the objects being linked to create a
Chris@1 5157 # shared library.
Chris@1 5158 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
Chris@1 5159
Chris@1 5160 # Dependencies to place after the objects being linked to create a
Chris@1 5161 # shared library.
Chris@1 5162 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
Chris@1 5163
Chris@1 5164 # Dependencies to place before the objects being linked to create a
Chris@1 5165 # shared library.
Chris@1 5166 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
Chris@1 5167
Chris@1 5168 # Dependencies to place after the objects being linked to create a
Chris@1 5169 # shared library.
Chris@1 5170 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
Chris@1 5171
Chris@1 5172 # The library search path used internally by the compiler when linking
Chris@1 5173 # a shared library.
Chris@1 5174 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
Chris@1 5175
Chris@1 5176 # Method to check whether dependent libraries are shared objects.
Chris@1 5177 deplibs_check_method=$lt_deplibs_check_method
Chris@1 5178
Chris@1 5179 # Command to use when deplibs_check_method == file_magic.
Chris@1 5180 file_magic_cmd=$lt_file_magic_cmd
Chris@1 5181
Chris@1 5182 # Flag that allows shared libraries with undefined symbols to be built.
Chris@1 5183 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
Chris@1 5184
Chris@1 5185 # Flag that forces no undefined symbols.
Chris@1 5186 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
Chris@1 5187
Chris@1 5188 # Commands used to finish a libtool library installation in a directory.
Chris@1 5189 finish_cmds=$lt_finish_cmds
Chris@1 5190
Chris@1 5191 # Same as above, but a single script fragment to be evaled but not shown.
Chris@1 5192 finish_eval=$lt_finish_eval
Chris@1 5193
Chris@1 5194 # Take the output of nm and produce a listing of raw symbols and C names.
Chris@1 5195 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
Chris@1 5196
Chris@1 5197 # Transform the output of nm in a proper C declaration
Chris@1 5198 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
Chris@1 5199
Chris@1 5200 # Transform the output of nm in a C name address pair
Chris@1 5201 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
Chris@1 5202
Chris@1 5203 # This is the shared library runtime path variable.
Chris@1 5204 runpath_var=$runpath_var
Chris@1 5205
Chris@1 5206 # This is the shared library path variable.
Chris@1 5207 shlibpath_var=$shlibpath_var
Chris@1 5208
Chris@1 5209 # Is shlibpath searched before the hard-coded library search path?
Chris@1 5210 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
Chris@1 5211
Chris@1 5212 # How to hardcode a shared library path into an executable.
Chris@1 5213 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
Chris@1 5214
Chris@1 5215 # Whether we should hardcode library paths into libraries.
Chris@1 5216 hardcode_into_libs=$hardcode_into_libs
Chris@1 5217
Chris@1 5218 # Flag to hardcode \$libdir into a binary during linking.
Chris@1 5219 # This must work even if \$libdir does not exist.
Chris@1 5220 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
Chris@1 5221
Chris@1 5222 # If ld is used when linking, flag to hardcode \$libdir into
Chris@1 5223 # a binary during linking. This must work even if \$libdir does
Chris@1 5224 # not exist.
Chris@1 5225 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
Chris@1 5226
Chris@1 5227 # Whether we need a single -rpath flag with a separated argument.
Chris@1 5228 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
Chris@1 5229
Chris@1 5230 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
Chris@1 5231 # resulting binary.
Chris@1 5232 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
Chris@1 5233
Chris@1 5234 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
Chris@1 5235 # resulting binary.
Chris@1 5236 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
Chris@1 5237
Chris@1 5238 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
Chris@1 5239 # the resulting binary.
Chris@1 5240 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
Chris@1 5241
Chris@1 5242 # Set to yes if building a shared library automatically hardcodes DIR into the library
Chris@1 5243 # and all subsequent libraries and executables linked against it.
Chris@1 5244 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
Chris@1 5245
Chris@1 5246 # Variables whose values should be saved in libtool wrapper scripts and
Chris@1 5247 # restored at relink time.
Chris@1 5248 variables_saved_for_relink="$variables_saved_for_relink"
Chris@1 5249
Chris@1 5250 # Whether libtool must link a program against all its dependency libraries.
Chris@1 5251 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
Chris@1 5252
Chris@1 5253 # Compile-time system search path for libraries
Chris@1 5254 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
Chris@1 5255
Chris@1 5256 # Run-time system search path for libraries
Chris@1 5257 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
Chris@1 5258
Chris@1 5259 # Fix the shell variable \$srcfile for the compiler.
Chris@1 5260 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
Chris@1 5261
Chris@1 5262 # Set to yes if exported symbols are required.
Chris@1 5263 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
Chris@1 5264
Chris@1 5265 # The commands to list exported symbols.
Chris@1 5266 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
Chris@1 5267
Chris@1 5268 # The commands to extract the exported symbol list from a shared archive.
Chris@1 5269 extract_expsyms_cmds=$lt_extract_expsyms_cmds
Chris@1 5270
Chris@1 5271 # Symbols that should not be listed in the preloaded symbols.
Chris@1 5272 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
Chris@1 5273
Chris@1 5274 # Symbols that must always be exported.
Chris@1 5275 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
Chris@1 5276
Chris@1 5277 ifelse([$1],[],
Chris@1 5278 [# ### END LIBTOOL CONFIG],
Chris@1 5279 [# ### END LIBTOOL TAG CONFIG: $tagname])
Chris@1 5280
Chris@1 5281 __EOF__
Chris@1 5282
Chris@1 5283 ifelse([$1],[], [
Chris@1 5284 case $host_os in
Chris@1 5285 aix3*)
Chris@1 5286 cat <<\EOF >> "$cfgfile"
Chris@1 5287
Chris@1 5288 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@1 5289 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@1 5290 # vanish in a puff of smoke.
Chris@1 5291 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@1 5292 COLLECT_NAMES=
Chris@1 5293 export COLLECT_NAMES
Chris@1 5294 fi
Chris@1 5295 EOF
Chris@1 5296 ;;
Chris@1 5297 esac
Chris@1 5298
Chris@1 5299 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@1 5300 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@1 5301 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@1 5302 # is reportedly fixed, but why not run on old versions too?
Chris@1 5303 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
Chris@1 5304
Chris@1 5305 mv -f "$cfgfile" "$ofile" || \
Chris@1 5306 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@1 5307 chmod +x "$ofile"
Chris@1 5308 ])
Chris@1 5309 else
Chris@1 5310 # If there is no Makefile yet, we rely on a make rule to execute
Chris@1 5311 # `config.status --recheck' to rerun these tests and create the
Chris@1 5312 # libtool script then.
Chris@1 5313 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
Chris@1 5314 if test -f "$ltmain_in"; then
Chris@1 5315 test -f Makefile && make "$ltmain"
Chris@1 5316 fi
Chris@1 5317 fi
Chris@1 5318 ])# AC_LIBTOOL_CONFIG
Chris@1 5319
Chris@1 5320
Chris@1 5321 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
Chris@1 5322 # -------------------------------------------
Chris@1 5323 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
Chris@1 5324 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
Chris@1 5325
Chris@1 5326 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@1 5327
Chris@1 5328 if test "$GCC" = yes; then
Chris@1 5329 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@1 5330
Chris@1 5331 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@1 5332 lt_cv_prog_compiler_rtti_exceptions,
Chris@1 5333 [-fno-rtti -fno-exceptions], [],
Chris@1 5334 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@1 5335 fi
Chris@1 5336 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
Chris@1 5337
Chris@1 5338
Chris@1 5339 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
Chris@1 5340 # ---------------------------------
Chris@1 5341 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
Chris@1 5342 [AC_REQUIRE([AC_CANONICAL_HOST])
Chris@1 5343 AC_REQUIRE([AC_PROG_NM])
Chris@1 5344 AC_REQUIRE([AC_OBJEXT])
Chris@1 5345 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@1 5346 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@1 5347 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@1 5348 [
Chris@1 5349 # These are sane defaults that work on at least a few old systems.
Chris@1 5350 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@1 5351
Chris@1 5352 # Character class describing NM global symbol codes.
Chris@1 5353 symcode='[[BCDEGRST]]'
Chris@1 5354
Chris@1 5355 # Regexp to match symbols that can be accessed directly from C.
Chris@1 5356 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@1 5357
Chris@1 5358 # Transform an extracted symbol line into a proper C declaration
Chris@1 5359 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
Chris@1 5360
Chris@1 5361 # Transform an extracted symbol line into symbol name and symbol address
Chris@1 5362 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'"
Chris@1 5363
Chris@1 5364 # Define system-specific variables.
Chris@1 5365 case $host_os in
Chris@1 5366 aix*)
Chris@1 5367 symcode='[[BCDT]]'
Chris@1 5368 ;;
Chris@1 5369 cygwin* | mingw* | pw32*)
Chris@1 5370 symcode='[[ABCDGISTW]]'
Chris@1 5371 ;;
Chris@1 5372 hpux*) # Its linker distinguishes data from code symbols
Chris@1 5373 if test "$host_cpu" = ia64; then
Chris@1 5374 symcode='[[ABCDEGRST]]'
Chris@1 5375 fi
Chris@1 5376 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@1 5377 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'"
Chris@1 5378 ;;
Chris@1 5379 linux*)
Chris@1 5380 if test "$host_cpu" = ia64; then
Chris@1 5381 symcode='[[ABCDGIRSTW]]'
Chris@1 5382 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@1 5383 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'"
Chris@1 5384 fi
Chris@1 5385 ;;
Chris@1 5386 irix* | nonstopux*)
Chris@1 5387 symcode='[[BCDEGRST]]'
Chris@1 5388 ;;
Chris@1 5389 osf*)
Chris@1 5390 symcode='[[BCDEGQRST]]'
Chris@1 5391 ;;
Chris@1 5392 solaris* | sysv5*)
Chris@1 5393 symcode='[[BDRT]]'
Chris@1 5394 ;;
Chris@1 5395 sysv4)
Chris@1 5396 symcode='[[DFNSTU]]'
Chris@1 5397 ;;
Chris@1 5398 esac
Chris@1 5399
Chris@1 5400 # Handle CRLF in mingw tool chain
Chris@1 5401 opt_cr=
Chris@1 5402 case $build_os in
Chris@1 5403 mingw*)
Chris@1 5404 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@1 5405 ;;
Chris@1 5406 esac
Chris@1 5407
Chris@1 5408 # If we're using GNU nm, then use its standard symbol codes.
Chris@1 5409 case `$NM -V 2>&1` in
Chris@1 5410 *GNU* | *'with BFD'*)
Chris@1 5411 symcode='[[ABCDGIRSTW]]' ;;
Chris@1 5412 esac
Chris@1 5413
Chris@1 5414 # Try without a prefix undercore, then with it.
Chris@1 5415 for ac_symprfx in "" "_"; do
Chris@1 5416
Chris@1 5417 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@1 5418 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@1 5419
Chris@1 5420 # Write the raw and C identifiers.
Chris@1 5421 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@1 5422
Chris@1 5423 # Check to see that the pipe works correctly.
Chris@1 5424 pipe_works=no
Chris@1 5425
Chris@1 5426 rm -f conftest*
Chris@1 5427 cat > conftest.$ac_ext <<EOF
Chris@1 5428 #ifdef __cplusplus
Chris@1 5429 extern "C" {
Chris@1 5430 #endif
Chris@1 5431 char nm_test_var;
Chris@1 5432 void nm_test_func(){}
Chris@1 5433 #ifdef __cplusplus
Chris@1 5434 }
Chris@1 5435 #endif
Chris@1 5436 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@1 5437 EOF
Chris@1 5438
Chris@1 5439 if AC_TRY_EVAL(ac_compile); then
Chris@1 5440 # Now try to grab the symbols.
Chris@1 5441 nlist=conftest.nm
Chris@1 5442 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
Chris@1 5443 # Try sorting and uniquifying the output.
Chris@1 5444 if sort "$nlist" | uniq > "$nlist"T; then
Chris@1 5445 mv -f "$nlist"T "$nlist"
Chris@1 5446 else
Chris@1 5447 rm -f "$nlist"T
Chris@1 5448 fi
Chris@1 5449
Chris@1 5450 # Make sure that we snagged all the symbols we need.
Chris@1 5451 if grep ' nm_test_var$' "$nlist" >/dev/null; then
Chris@1 5452 if grep ' nm_test_func$' "$nlist" >/dev/null; then
Chris@1 5453 cat <<EOF > conftest.$ac_ext
Chris@1 5454 #ifdef __cplusplus
Chris@1 5455 extern "C" {
Chris@1 5456 #endif
Chris@1 5457
Chris@1 5458 EOF
Chris@1 5459 # Now generate the symbol file.
Chris@1 5460 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
Chris@1 5461
Chris@1 5462 cat <<EOF >> conftest.$ac_ext
Chris@1 5463 #if defined (__STDC__) && __STDC__
Chris@1 5464 # define lt_ptr_t void *
Chris@1 5465 #else
Chris@1 5466 # define lt_ptr_t char *
Chris@1 5467 # define const
Chris@1 5468 #endif
Chris@1 5469
Chris@1 5470 /* The mapping between symbol names and symbols. */
Chris@1 5471 const struct {
Chris@1 5472 const char *name;
Chris@1 5473 lt_ptr_t address;
Chris@1 5474 }
Chris@1 5475 lt_preloaded_symbols[[]] =
Chris@1 5476 {
Chris@1 5477 EOF
Chris@1 5478 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
Chris@1 5479 cat <<\EOF >> conftest.$ac_ext
Chris@1 5480 {0, (lt_ptr_t) 0}
Chris@1 5481 };
Chris@1 5482
Chris@1 5483 #ifdef __cplusplus
Chris@1 5484 }
Chris@1 5485 #endif
Chris@1 5486 EOF
Chris@1 5487 # Now try linking the two files.
Chris@1 5488 mv conftest.$ac_objext conftstm.$ac_objext
Chris@1 5489 lt_save_LIBS="$LIBS"
Chris@1 5490 lt_save_CFLAGS="$CFLAGS"
Chris@1 5491 LIBS="conftstm.$ac_objext"
Chris@1 5492 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@1 5493 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
Chris@1 5494 pipe_works=yes
Chris@1 5495 fi
Chris@1 5496 LIBS="$lt_save_LIBS"
Chris@1 5497 CFLAGS="$lt_save_CFLAGS"
Chris@1 5498 else
Chris@1 5499 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@1 5500 fi
Chris@1 5501 else
Chris@1 5502 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@1 5503 fi
Chris@1 5504 else
Chris@1 5505 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@1 5506 fi
Chris@1 5507 else
Chris@1 5508 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@1 5509 cat conftest.$ac_ext >&5
Chris@1 5510 fi
Chris@1 5511 rm -f conftest* conftst*
Chris@1 5512
Chris@1 5513 # Do not use the global_symbol_pipe unless it works.
Chris@1 5514 if test "$pipe_works" = yes; then
Chris@1 5515 break
Chris@1 5516 else
Chris@1 5517 lt_cv_sys_global_symbol_pipe=
Chris@1 5518 fi
Chris@1 5519 done
Chris@1 5520 ])
Chris@1 5521 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@1 5522 lt_cv_sys_global_symbol_to_cdecl=
Chris@1 5523 fi
Chris@1 5524 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@1 5525 AC_MSG_RESULT(failed)
Chris@1 5526 else
Chris@1 5527 AC_MSG_RESULT(ok)
Chris@1 5528 fi
Chris@1 5529 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
Chris@1 5530
Chris@1 5531
Chris@1 5532 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
Chris@1 5533 # ---------------------------------------
Chris@1 5534 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
Chris@1 5535 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@1 5536 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 5537 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
Chris@1 5538
Chris@1 5539 AC_MSG_CHECKING([for $compiler option to produce PIC])
Chris@1 5540 ifelse([$1],[CXX],[
Chris@1 5541 # C++ specific cases for pic, static, wl, etc.
Chris@1 5542 if test "$GXX" = yes; then
Chris@1 5543 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5544 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5545
Chris@1 5546 case $host_os in
Chris@1 5547 aix*)
Chris@1 5548 # All AIX code is PIC.
Chris@1 5549 if test "$host_cpu" = ia64; then
Chris@1 5550 # AIX 5 now supports IA64 processor
Chris@1 5551 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5552 fi
Chris@1 5553 ;;
Chris@1 5554 amigaos*)
Chris@1 5555 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@1 5556 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@1 5557 # like `-m68040'.
Chris@1 5558 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@1 5559 ;;
Chris@1 5560 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@1 5561 # PIC is the default for these OSes.
Chris@1 5562 ;;
Chris@1 5563 mingw* | os2* | pw32*)
Chris@1 5564 # This hack is so that the source file can tell whether it is being
Chris@1 5565 # built for inclusion in a dll (and should export symbols for example).
Chris@1 5566 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
Chris@1 5567 ;;
Chris@1 5568 darwin* | rhapsody*)
Chris@1 5569 # PIC is the default on this platform
Chris@1 5570 # Common symbols not allowed in MH_DYLIB files
Chris@1 5571 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@1 5572 ;;
Chris@1 5573 *djgpp*)
Chris@1 5574 # DJGPP does not support shared libraries at all
Chris@1 5575 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 5576 ;;
Chris@1 5577 sysv4*MP*)
Chris@1 5578 if test -d /usr/nec; then
Chris@1 5579 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@1 5580 fi
Chris@1 5581 ;;
Chris@1 5582 hpux*)
Chris@1 5583 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@1 5584 # not for PA HP-UX.
Chris@1 5585 case "$host_cpu" in
Chris@1 5586 hppa*64*|ia64*)
Chris@1 5587 ;;
Chris@1 5588 *)
Chris@1 5589 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5590 ;;
Chris@1 5591 esac
Chris@1 5592 ;;
Chris@1 5593 *)
Chris@1 5594 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5595 ;;
Chris@1 5596 esac
Chris@1 5597 else
Chris@1 5598 case $host_os in
Chris@1 5599 aix4* | aix5*)
Chris@1 5600 # All AIX code is PIC.
Chris@1 5601 if test "$host_cpu" = ia64; then
Chris@1 5602 # AIX 5 now supports IA64 processor
Chris@1 5603 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5604 else
Chris@1 5605 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@1 5606 fi
Chris@1 5607 ;;
Chris@1 5608 chorus*)
Chris@1 5609 case $cc_basename in
Chris@1 5610 cxch68*)
Chris@1 5611 # Green Hills C++ Compiler
Chris@1 5612 # _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"
Chris@1 5613 ;;
Chris@1 5614 esac
Chris@1 5615 ;;
Chris@1 5616 darwin*)
Chris@1 5617 # PIC is the default on this platform
Chris@1 5618 # Common symbols not allowed in MH_DYLIB files
Chris@1 5619 case $cc_basename in
Chris@1 5620 xlc*)
Chris@1 5621 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
Chris@1 5622 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5623 ;;
Chris@1 5624 esac
Chris@1 5625 ;;
Chris@1 5626 dgux*)
Chris@1 5627 case $cc_basename in
Chris@1 5628 ec++*)
Chris@1 5629 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5630 ;;
Chris@1 5631 ghcx*)
Chris@1 5632 # Green Hills C++ Compiler
Chris@1 5633 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@1 5634 ;;
Chris@1 5635 *)
Chris@1 5636 ;;
Chris@1 5637 esac
Chris@1 5638 ;;
Chris@1 5639 freebsd* | kfreebsd*-gnu | dragonfly*)
Chris@1 5640 # FreeBSD uses GNU C++
Chris@1 5641 ;;
Chris@1 5642 hpux9* | hpux10* | hpux11*)
Chris@1 5643 case $cc_basename in
Chris@1 5644 CC*)
Chris@1 5645 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5646 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
Chris@1 5647 if test "$host_cpu" != ia64; then
Chris@1 5648 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@1 5649 fi
Chris@1 5650 ;;
Chris@1 5651 aCC*)
Chris@1 5652 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5653 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
Chris@1 5654 case "$host_cpu" in
Chris@1 5655 hppa*64*|ia64*)
Chris@1 5656 # +Z the default
Chris@1 5657 ;;
Chris@1 5658 *)
Chris@1 5659 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@1 5660 ;;
Chris@1 5661 esac
Chris@1 5662 ;;
Chris@1 5663 *)
Chris@1 5664 ;;
Chris@1 5665 esac
Chris@1 5666 ;;
Chris@1 5667 irix5* | irix6* | nonstopux*)
Chris@1 5668 case $cc_basename in
Chris@1 5669 CC*)
Chris@1 5670 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5671 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5672 # CC pic flag -KPIC is the default.
Chris@1 5673 ;;
Chris@1 5674 *)
Chris@1 5675 ;;
Chris@1 5676 esac
Chris@1 5677 ;;
Chris@1 5678 linux*)
Chris@1 5679 case $cc_basename in
Chris@1 5680 KCC*)
Chris@1 5681 # KAI C++ Compiler
Chris@1 5682 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@1 5683 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5684 ;;
Chris@1 5685 icpc* | ecpc*)
Chris@1 5686 # Intel C++
Chris@1 5687 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5688 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5689 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5690 ;;
Chris@1 5691 pgCC*)
Chris@1 5692 # Portland Group C++ compiler.
Chris@1 5693 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5694 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@1 5695 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5696 ;;
Chris@1 5697 cxx*)
Chris@1 5698 # Compaq C++
Chris@1 5699 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@1 5700 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@1 5701 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 5702 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5703 ;;
Chris@1 5704 *)
Chris@1 5705 ;;
Chris@1 5706 esac
Chris@1 5707 ;;
Chris@1 5708 lynxos*)
Chris@1 5709 ;;
Chris@1 5710 m88k*)
Chris@1 5711 ;;
Chris@1 5712 mvs*)
Chris@1 5713 case $cc_basename in
Chris@1 5714 cxx*)
Chris@1 5715 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@1 5716 ;;
Chris@1 5717 *)
Chris@1 5718 ;;
Chris@1 5719 esac
Chris@1 5720 ;;
Chris@1 5721 netbsd*)
Chris@1 5722 ;;
Chris@1 5723 osf3* | osf4* | osf5*)
Chris@1 5724 case $cc_basename in
Chris@1 5725 KCC*)
Chris@1 5726 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@1 5727 ;;
Chris@1 5728 RCC*)
Chris@1 5729 # Rational C++ 2.4.1
Chris@1 5730 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@1 5731 ;;
Chris@1 5732 cxx*)
Chris@1 5733 # Digital/Compaq C++
Chris@1 5734 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5735 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@1 5736 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@1 5737 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 5738 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5739 ;;
Chris@1 5740 *)
Chris@1 5741 ;;
Chris@1 5742 esac
Chris@1 5743 ;;
Chris@1 5744 psos*)
Chris@1 5745 ;;
Chris@1 5746 sco*)
Chris@1 5747 case $cc_basename in
Chris@1 5748 CC*)
Chris@1 5749 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5750 ;;
Chris@1 5751 *)
Chris@1 5752 ;;
Chris@1 5753 esac
Chris@1 5754 ;;
Chris@1 5755 solaris*)
Chris@1 5756 case $cc_basename in
Chris@1 5757 CC*)
Chris@1 5758 # Sun C++ 4.2, 5.x and Centerline C++
Chris@1 5759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5760 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5761 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@1 5762 ;;
Chris@1 5763 gcx*)
Chris@1 5764 # Green Hills C++ Compiler
Chris@1 5765 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@1 5766 ;;
Chris@1 5767 *)
Chris@1 5768 ;;
Chris@1 5769 esac
Chris@1 5770 ;;
Chris@1 5771 sunos4*)
Chris@1 5772 case $cc_basename in
Chris@1 5773 CC*)
Chris@1 5774 # Sun C++ 4.x
Chris@1 5775 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@1 5776 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5777 ;;
Chris@1 5778 lcc*)
Chris@1 5779 # Lucid
Chris@1 5780 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@1 5781 ;;
Chris@1 5782 *)
Chris@1 5783 ;;
Chris@1 5784 esac
Chris@1 5785 ;;
Chris@1 5786 tandem*)
Chris@1 5787 case $cc_basename in
Chris@1 5788 NCC*)
Chris@1 5789 # NonStop-UX NCC 3.20
Chris@1 5790 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5791 ;;
Chris@1 5792 *)
Chris@1 5793 ;;
Chris@1 5794 esac
Chris@1 5795 ;;
Chris@1 5796 unixware*)
Chris@1 5797 ;;
Chris@1 5798 vxworks*)
Chris@1 5799 ;;
Chris@1 5800 *)
Chris@1 5801 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@1 5802 ;;
Chris@1 5803 esac
Chris@1 5804 fi
Chris@1 5805 ],
Chris@1 5806 [
Chris@1 5807 if test "$GCC" = yes; then
Chris@1 5808 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5809 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5810
Chris@1 5811 case $host_os in
Chris@1 5812 aix*)
Chris@1 5813 # All AIX code is PIC.
Chris@1 5814 if test "$host_cpu" = ia64; then
Chris@1 5815 # AIX 5 now supports IA64 processor
Chris@1 5816 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5817 fi
Chris@1 5818 ;;
Chris@1 5819
Chris@1 5820 amigaos*)
Chris@1 5821 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@1 5822 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@1 5823 # like `-m68040'.
Chris@1 5824 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@1 5825 ;;
Chris@1 5826
Chris@1 5827 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@1 5828 # PIC is the default for these OSes.
Chris@1 5829 ;;
Chris@1 5830
Chris@1 5831 mingw* | pw32* | os2*)
Chris@1 5832 # This hack is so that the source file can tell whether it is being
Chris@1 5833 # built for inclusion in a dll (and should export symbols for example).
Chris@1 5834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
Chris@1 5835 ;;
Chris@1 5836
Chris@1 5837 darwin* | rhapsody*)
Chris@1 5838 # PIC is the default on this platform
Chris@1 5839 # Common symbols not allowed in MH_DYLIB files
Chris@1 5840 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@1 5841 ;;
Chris@1 5842
Chris@1 5843 msdosdjgpp*)
Chris@1 5844 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@1 5845 # on systems that don't support them.
Chris@1 5846 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@1 5847 enable_shared=no
Chris@1 5848 ;;
Chris@1 5849
Chris@1 5850 sysv4*MP*)
Chris@1 5851 if test -d /usr/nec; then
Chris@1 5852 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@1 5853 fi
Chris@1 5854 ;;
Chris@1 5855
Chris@1 5856 hpux*)
Chris@1 5857 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@1 5858 # not for PA HP-UX.
Chris@1 5859 case "$host_cpu" in
Chris@1 5860 hppa*64*|ia64*)
Chris@1 5861 # +Z the default
Chris@1 5862 ;;
Chris@1 5863 *)
Chris@1 5864 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5865 ;;
Chris@1 5866 esac
Chris@1 5867 ;;
Chris@1 5868
Chris@1 5869 *)
Chris@1 5870 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@1 5871 ;;
Chris@1 5872 esac
Chris@1 5873 else
Chris@1 5874 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@1 5875 case $host_os in
Chris@1 5876 aix*)
Chris@1 5877 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5878 if test "$host_cpu" = ia64; then
Chris@1 5879 # AIX 5 now supports IA64 processor
Chris@1 5880 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5881 else
Chris@1 5882 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@1 5883 fi
Chris@1 5884 ;;
Chris@1 5885 darwin*)
Chris@1 5886 # PIC is the default on this platform
Chris@1 5887 # Common symbols not allowed in MH_DYLIB files
Chris@1 5888 case $cc_basename in
Chris@1 5889 xlc*)
Chris@1 5890 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
Chris@1 5891 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5892 ;;
Chris@1 5893 esac
Chris@1 5894 ;;
Chris@1 5895
Chris@1 5896 mingw* | pw32* | os2*)
Chris@1 5897 # This hack is so that the source file can tell whether it is being
Chris@1 5898 # built for inclusion in a dll (and should export symbols for example).
Chris@1 5899 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
Chris@1 5900 ;;
Chris@1 5901
Chris@1 5902 hpux9* | hpux10* | hpux11*)
Chris@1 5903 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5904 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@1 5905 # not for PA HP-UX.
Chris@1 5906 case "$host_cpu" in
Chris@1 5907 hppa*64*|ia64*)
Chris@1 5908 # +Z the default
Chris@1 5909 ;;
Chris@1 5910 *)
Chris@1 5911 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@1 5912 ;;
Chris@1 5913 esac
Chris@1 5914 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@1 5915 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@1 5916 ;;
Chris@1 5917
Chris@1 5918 irix5* | irix6* | nonstopux*)
Chris@1 5919 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5920 # PIC (with -KPIC) is the default.
Chris@1 5921 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5922 ;;
Chris@1 5923
Chris@1 5924 newsos6)
Chris@1 5925 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5926 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5927 ;;
Chris@1 5928
Chris@1 5929 linux*)
Chris@1 5930 case $cc_basename in
Chris@1 5931 icc* | ecc*)
Chris@1 5932 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5933 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5934 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5935 ;;
Chris@1 5936 pgcc* | pgf77* | pgf90*)
Chris@1 5937 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@1 5938 # which looks to be a dead project)
Chris@1 5939 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5940 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@1 5941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@1 5942 ;;
Chris@1 5943 ccc*)
Chris@1 5944 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5945 # All Alpha code is PIC.
Chris@1 5946 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5947 ;;
Chris@1 5948 esac
Chris@1 5949 ;;
Chris@1 5950
Chris@1 5951 osf3* | osf4* | osf5*)
Chris@1 5952 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5953 # All OSF/1 code is PIC.
Chris@1 5954 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@1 5955 ;;
Chris@1 5956
Chris@1 5957 sco3.2v5*)
Chris@1 5958 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
Chris@1 5959 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
Chris@1 5960 ;;
Chris@1 5961
Chris@1 5962 solaris*)
Chris@1 5963 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5964 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5965 case $cc_basename in
Chris@1 5966 f77* | f90* | f95*)
Chris@1 5967 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@1 5968 *)
Chris@1 5969 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@1 5970 esac
Chris@1 5971 ;;
Chris@1 5972
Chris@1 5973 sunos4*)
Chris@1 5974 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@1 5975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@1 5976 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5977 ;;
Chris@1 5978
Chris@1 5979 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@1 5980 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5981 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@1 5982 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5983 ;;
Chris@1 5984
Chris@1 5985 sysv4*MP*)
Chris@1 5986 if test -d /usr/nec ;then
Chris@1 5987 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@1 5988 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 5989 fi
Chris@1 5990 ;;
Chris@1 5991
Chris@1 5992 unicos*)
Chris@1 5993 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@1 5994 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@1 5995 ;;
Chris@1 5996
Chris@1 5997 uts4*)
Chris@1 5998 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@1 5999 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@1 6000 ;;
Chris@1 6001
Chris@1 6002 *)
Chris@1 6003 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@1 6004 ;;
Chris@1 6005 esac
Chris@1 6006 fi
Chris@1 6007 ])
Chris@1 6008 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@1 6009
Chris@1 6010 #
Chris@1 6011 # Check to make sure the PIC flag actually works.
Chris@1 6012 #
Chris@1 6013 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@1 6014 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@1 6015 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
Chris@1 6016 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
Chris@1 6017 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@1 6018 "" | " "*) ;;
Chris@1 6019 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@1 6020 esac],
Chris@1 6021 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 6022 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@1 6023 fi
Chris@1 6024 case "$host_os" in
Chris@1 6025 # For platforms which do not support PIC, -DPIC is meaningless:
Chris@1 6026 *djgpp*)
Chris@1 6027 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@1 6028 ;;
Chris@1 6029 *)
Chris@1 6030 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
Chris@1 6031 ;;
Chris@1 6032 esac
Chris@1 6033 ])
Chris@1 6034
Chris@1 6035
Chris@1 6036 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
Chris@1 6037 # ------------------------------------
Chris@1 6038 # See if the linker supports building shared libraries.
Chris@1 6039 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
Chris@1 6040 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@1 6041 ifelse([$1],[CXX],[
Chris@1 6042 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@1 6043 case $host_os in
Chris@1 6044 aix4* | aix5*)
Chris@1 6045 # If we're using GNU nm, then we don't want the "-C" option.
Chris@1 6046 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@1 6047 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
Chris@1 6048 _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'
Chris@1 6049 else
Chris@1 6050 _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'
Chris@1 6051 fi
Chris@1 6052 ;;
Chris@1 6053 pw32*)
Chris@1 6054 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
Chris@1 6055 ;;
Chris@1 6056 cygwin* | mingw*)
Chris@1 6057 _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'
Chris@1 6058 ;;
Chris@1 6059 *)
Chris@1 6060 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@1 6061 ;;
Chris@1 6062 esac
Chris@1 6063 ],[
Chris@1 6064 runpath_var=
Chris@1 6065 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
Chris@1 6066 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@1 6067 _LT_AC_TAGVAR(archive_cmds, $1)=
Chris@1 6068 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
Chris@1 6069 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
Chris@1 6070 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@1 6071 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@1 6072 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 6073 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
Chris@1 6074 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@1 6075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
Chris@1 6076 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
Chris@1 6077 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 6078 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
Chris@1 6079 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@1 6080 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
Chris@1 6081 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
Chris@1 6082 _LT_AC_TAGVAR(module_cmds, $1)=
Chris@1 6083 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
Chris@1 6084 _LT_AC_TAGVAR(always_export_symbols, $1)=no
Chris@1 6085 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@1 6086 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@1 6087 # included in the symbol list
Chris@1 6088 _LT_AC_TAGVAR(include_expsyms, $1)=
Chris@1 6089 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@1 6090 # it will be wrapped by ` (' and `)$', so one must not match beginning or
Chris@1 6091 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
Chris@1 6092 # as well as any symbol that contains `d'.
Chris@1 6093 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
Chris@1 6094 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@1 6095 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@1 6096 # the symbol is explicitly referenced. Since portable code cannot
Chris@1 6097 # rely on this symbol name, it's probably fine to never include it in
Chris@1 6098 # preloaded symbol tables.
Chris@1 6099 extract_expsyms_cmds=
Chris@1 6100 # Just being paranoid about ensuring that cc_basename is set.
Chris@1 6101 _LT_CC_BASENAME([$compiler])
Chris@1 6102 case $host_os in
Chris@1 6103 cygwin* | mingw* | pw32*)
Chris@1 6104 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@1 6105 # When not using gcc, we currently assume that we are using
Chris@1 6106 # Microsoft Visual C++.
Chris@1 6107 if test "$GCC" != yes; then
Chris@1 6108 with_gnu_ld=no
Chris@1 6109 fi
Chris@1 6110 ;;
Chris@1 6111 openbsd*)
Chris@1 6112 with_gnu_ld=no
Chris@1 6113 ;;
Chris@1 6114 esac
Chris@1 6115
Chris@1 6116 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
Chris@1 6117 if test "$with_gnu_ld" = yes; then
Chris@1 6118 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@1 6119 wlarc='${wl}'
Chris@1 6120
Chris@1 6121 # Set some defaults for GNU ld with shared library support. These
Chris@1 6122 # are reset later if shared libraries are not supported. Putting them
Chris@1 6123 # here allows them to be overridden if necessary.
Chris@1 6124 runpath_var=LD_RUN_PATH
Chris@1 6125 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
Chris@1 6126 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@1 6127 # ancient GNU ld didn't support --whole-archive et. al.
Chris@1 6128 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
Chris@1 6129 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@1 6130 else
Chris@1 6131 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 6132 fi
Chris@1 6133 supports_anon_versioning=no
Chris@1 6134 case `$LD -v 2>/dev/null` in
Chris@1 6135 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@1 6136 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@1 6137 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@1 6138 *\ 2.11.*) ;; # other 2.11 versions
Chris@1 6139 *) supports_anon_versioning=yes ;;
Chris@1 6140 esac
Chris@1 6141
Chris@1 6142 # See if GNU ld supports shared libraries.
Chris@1 6143 case $host_os in
Chris@1 6144 aix3* | aix4* | aix5*)
Chris@1 6145 # On AIX/PPC, the GNU linker is very broken
Chris@1 6146 if test "$host_cpu" != ia64; then
Chris@1 6147 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6148 cat <<EOF 1>&2
Chris@1 6149
Chris@1 6150 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
Chris@1 6151 *** to be unable to reliably create shared libraries on AIX.
Chris@1 6152 *** Therefore, libtool is disabling shared libraries support. If you
Chris@1 6153 *** really care for shared libraries, you may want to modify your PATH
Chris@1 6154 *** so that a non-GNU linker is found, and then restart.
Chris@1 6155
Chris@1 6156 EOF
Chris@1 6157 fi
Chris@1 6158 ;;
Chris@1 6159
Chris@1 6160 amigaos*)
Chris@1 6161 _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)'
Chris@1 6162 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6163 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6164
Chris@1 6165 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
Chris@1 6166 # that the semantics of dynamic libraries on AmigaOS, at least up
Chris@1 6167 # to version 4, is to share data among multiple programs linked
Chris@1 6168 # with the same dynamic library. Since this doesn't match the
Chris@1 6169 # behavior of shared libraries on other platforms, we can't use
Chris@1 6170 # them.
Chris@1 6171 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6172 ;;
Chris@1 6173
Chris@1 6174 beos*)
Chris@1 6175 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
Chris@1 6176 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 6177 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@1 6178 # support --undefined. This deserves some investigation. FIXME
Chris@1 6179 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 6180 else
Chris@1 6181 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6182 fi
Chris@1 6183 ;;
Chris@1 6184
Chris@1 6185 cygwin* | mingw* | pw32*)
Chris@1 6186 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@1 6187 # as there is no search path for DLLs.
Chris@1 6188 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6189 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 6190 _LT_AC_TAGVAR(always_export_symbols, $1)=no
Chris@1 6191 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@1 6192 _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'
Chris@1 6193
Chris@1 6194 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
Chris@1 6195 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
Chris@1 6196 # If the export-symbols file already is a .def file (1st line
Chris@1 6197 # is EXPORTS), use it as is; otherwise, prepend...
Chris@1 6198 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@1 6199 cp $export_symbols $output_objdir/$soname.def;
Chris@1 6200 else
Chris@1 6201 echo EXPORTS > $output_objdir/$soname.def;
Chris@1 6202 cat $export_symbols >> $output_objdir/$soname.def;
Chris@1 6203 fi~
Chris@1 6204 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
Chris@1 6205 else
Chris@1 6206 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6207 fi
Chris@1 6208 ;;
Chris@1 6209
Chris@1 6210 linux*)
Chris@1 6211 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
Chris@1 6212 tmp_addflag=
Chris@1 6213 case $cc_basename,$host_cpu in
Chris@1 6214 pgcc*) # Portland Group C compiler
Chris@1 6215 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 6216 ;;
Chris@1 6217 pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
Chris@1 6218 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 6219 tmp_addflag=' -fpic -Mnomain' ;;
Chris@1 6220 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@1 6221 tmp_addflag=' -i_dynamic' ;;
Chris@1 6222 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@1 6223 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@1 6224 ifc* | ifort*) # Intel Fortran compiler
Chris@1 6225 tmp_addflag=' -nofor_main' ;;
Chris@1 6226 esac
Chris@1 6227 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 6228
Chris@1 6229 if test $supports_anon_versioning = yes; then
Chris@1 6230 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
Chris@1 6231 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@1 6232 $echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@1 6233 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
Chris@1 6234 fi
Chris@1 6235 else
Chris@1 6236 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6237 fi
Chris@1 6238 ;;
Chris@1 6239
Chris@1 6240 netbsd*)
Chris@1 6241 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
Chris@1 6242 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@1 6243 wlarc=
Chris@1 6244 else
Chris@1 6245 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 6246 _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'
Chris@1 6247 fi
Chris@1 6248 ;;
Chris@1 6249
Chris@1 6250 solaris* | sysv5*)
Chris@1 6251 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
Chris@1 6252 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6253 cat <<EOF 1>&2
Chris@1 6254
Chris@1 6255 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@1 6256 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@1 6257 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@1 6258 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@1 6259 *** your PATH or compiler configuration so that the native linker is
Chris@1 6260 *** used, and then restart.
Chris@1 6261
Chris@1 6262 EOF
Chris@1 6263 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
Chris@1 6264 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 6265 _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'
Chris@1 6266 else
Chris@1 6267 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6268 fi
Chris@1 6269 ;;
Chris@1 6270
Chris@1 6271 sunos4*)
Chris@1 6272 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6273 wlarc=
Chris@1 6274 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6275 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6276 ;;
Chris@1 6277
Chris@1 6278 *)
Chris@1 6279 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
Chris@1 6280 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@1 6281 _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'
Chris@1 6282 else
Chris@1 6283 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6284 fi
Chris@1 6285 ;;
Chris@1 6286 esac
Chris@1 6287
Chris@1 6288 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
Chris@1 6289 runpath_var=
Chris@1 6290 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@1 6291 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@1 6292 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
Chris@1 6293 fi
Chris@1 6294 else
Chris@1 6295 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@1 6296 case $host_os in
Chris@1 6297 aix3*)
Chris@1 6298 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 6299 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
Chris@1 6300 _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'
Chris@1 6301 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@1 6302 # are no directories specified by -L.
Chris@1 6303 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6304 if test "$GCC" = yes && test -z "$link_static_flag"; then
Chris@1 6305 # Neither direct hardcoding nor static linking is supported with a
Chris@1 6306 # broken collect2.
Chris@1 6307 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
Chris@1 6308 fi
Chris@1 6309 ;;
Chris@1 6310
Chris@1 6311 aix4* | aix5*)
Chris@1 6312 if test "$host_cpu" = ia64; then
Chris@1 6313 # On IA64, the linker does run time linking by default, so we don't
Chris@1 6314 # have to do anything special.
Chris@1 6315 aix_use_runtimelinking=no
Chris@1 6316 exp_sym_flag='-Bexport'
Chris@1 6317 no_entry_flag=""
Chris@1 6318 else
Chris@1 6319 # If we're using GNU nm, then we don't want the "-C" option.
Chris@1 6320 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@1 6321 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
Chris@1 6322 _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'
Chris@1 6323 else
Chris@1 6324 _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'
Chris@1 6325 fi
Chris@1 6326 aix_use_runtimelinking=no
Chris@1 6327
Chris@1 6328 # Test if we are trying to use run time linking or normal
Chris@1 6329 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@1 6330 # need to do runtime linking.
Chris@1 6331 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
Chris@1 6332 for ld_flag in $LDFLAGS; do
Chris@1 6333 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
Chris@1 6334 aix_use_runtimelinking=yes
Chris@1 6335 break
Chris@1 6336 fi
Chris@1 6337 done
Chris@1 6338 esac
Chris@1 6339
Chris@1 6340 exp_sym_flag='-bexport'
Chris@1 6341 no_entry_flag='-bnoentry'
Chris@1 6342 fi
Chris@1 6343
Chris@1 6344 # When large executables or shared objects are built, AIX ld can
Chris@1 6345 # have problems creating the table of contents. If linking a library
Chris@1 6346 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@1 6347 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@1 6348 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@1 6349
Chris@1 6350 _LT_AC_TAGVAR(archive_cmds, $1)=''
Chris@1 6351 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6352 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@1 6353 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 6354
Chris@1 6355 if test "$GCC" = yes; then
Chris@1 6356 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@1 6357 # We only want to do this on AIX 4.2 and lower, the check
Chris@1 6358 # below for broken collect2 doesn't work under 4.3+
Chris@1 6359 collect2name=`${CC} -print-prog-name=collect2`
Chris@1 6360 if test -f "$collect2name" && \
Chris@1 6361 strings "$collect2name" | grep resolve_lib_name >/dev/null
Chris@1 6362 then
Chris@1 6363 # We have reworked collect2
Chris@1 6364 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6365 else
Chris@1 6366 # We have old collect2
Chris@1 6367 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
Chris@1 6368 # It fails to find uninstalled libraries when the uninstalled
Chris@1 6369 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@1 6370 # to unsupported forces relinking
Chris@1 6371 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6373 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
Chris@1 6374 fi
Chris@1 6375 esac
Chris@1 6376 shared_flag='-shared'
Chris@1 6377 if test "$aix_use_runtimelinking" = yes; then
Chris@1 6378 shared_flag="$shared_flag "'${wl}-G'
Chris@1 6379 fi
Chris@1 6380 else
Chris@1 6381 # not using gcc
Chris@1 6382 if test "$host_cpu" = ia64; then
Chris@1 6383 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@1 6384 # chokes on -Wl,-G. The following line is correct:
Chris@1 6385 shared_flag='-G'
Chris@1 6386 else
Chris@1 6387 if test "$aix_use_runtimelinking" = yes; then
Chris@1 6388 shared_flag='${wl}-G'
Chris@1 6389 else
Chris@1 6390 shared_flag='${wl}-bM:SRE'
Chris@1 6391 fi
Chris@1 6392 fi
Chris@1 6393 fi
Chris@1 6394
Chris@1 6395 # It seems that -bexpall does not export symbols beginning with
Chris@1 6396 # underscore (_), so it is better to generate a list of symbols to export.
Chris@1 6397 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
Chris@1 6398 if test "$aix_use_runtimelinking" = yes; then
Chris@1 6399 # Warning - without using the other runtime loading flags (-brtl),
Chris@1 6400 # -berok will link without error, but may produce a broken library.
Chris@1 6401 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@1 6402 # Determine the default libpath from the value encoded in an empty executable.
Chris@1 6403 _LT_AC_SYS_LIBPATH_AIX
Chris@1 6404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@1 6405 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
Chris@1 6406 else
Chris@1 6407 if test "$host_cpu" = ia64; then
Chris@1 6408 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@1 6409 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@1 6410 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
Chris@1 6411 else
Chris@1 6412 # Determine the default libpath from the value encoded in an empty executable.
Chris@1 6413 _LT_AC_SYS_LIBPATH_AIX
Chris@1 6414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@1 6415 # Warning - without using the other run time loading flags,
Chris@1 6416 # -berok will link without error, but may produce a broken library.
Chris@1 6417 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@1 6418 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@1 6419 # -bexpall does not export symbols beginning with underscore (_)
Chris@1 6420 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
Chris@1 6421 # Exported symbols can be pulled into shared objects from archives
Chris@1 6422 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
Chris@1 6423 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@1 6424 # This is similar to how AIX traditionally builds it's shared libraries.
Chris@1 6425 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
Chris@1 6426 fi
Chris@1 6427 fi
Chris@1 6428 ;;
Chris@1 6429
Chris@1 6430 amigaos*)
Chris@1 6431 _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)'
Chris@1 6432 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6433 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6434 # see comment about different semantics on the GNU ld section
Chris@1 6435 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6436 ;;
Chris@1 6437
Chris@1 6438 bsdi[[45]]*)
Chris@1 6439 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@1 6440 ;;
Chris@1 6441
Chris@1 6442 cygwin* | mingw* | pw32*)
Chris@1 6443 # When not using gcc, we currently assume that we are using
Chris@1 6444 # Microsoft Visual C++.
Chris@1 6445 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@1 6446 # no search path for DLLs.
Chris@1 6447 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@1 6448 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 6449 # Tell ltmain to make .lib files, not .a files.
Chris@1 6450 libext=lib
Chris@1 6451 # Tell ltmain to make .dll files, not .so files.
Chris@1 6452 shrext_cmds=".dll"
Chris@1 6453 # FIXME: Setting linknames here is a bad hack.
Chris@1 6454 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@1 6455 # The linker will automatically build a .lib file if we build a DLL.
Chris@1 6456 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
Chris@1 6457 # FIXME: Should let the user specify the lib program.
Chris@1 6458 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
Chris@1 6459 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
Chris@1 6460 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@1 6461 ;;
Chris@1 6462
Chris@1 6463 darwin* | rhapsody*)
Chris@1 6464 case "$host_os" in
Chris@1 6465 rhapsody* | darwin1.[[012]])
Chris@1 6466 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
Chris@1 6467 ;;
Chris@1 6468 *) # Darwin 1.3 on
Chris@1 6469 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
Chris@1 6470 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
Chris@1 6471 else
Chris@1 6472 case ${MACOSX_DEPLOYMENT_TARGET} in
Chris@1 6473 10.[[012]])
Chris@1 6474 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
Chris@1 6475 ;;
Chris@1 6476 10.*)
Chris@1 6477 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
Chris@1 6478 ;;
Chris@1 6479 esac
Chris@1 6480 fi
Chris@1 6481 ;;
Chris@1 6482 esac
Chris@1 6483 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 6484 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 6485 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
Chris@1 6486 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@1 6487 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@1 6488 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 6489 if test "$GCC" = yes ; then
Chris@1 6490 output_verbose_link_cmd='echo'
Chris@1 6491 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
Chris@1 6492 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
Chris@1 6493 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
Chris@1 6494 _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}'
Chris@1 6495 _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}'
Chris@1 6496 else
Chris@1 6497 case $cc_basename in
Chris@1 6498 xlc*)
Chris@1 6499 output_verbose_link_cmd='echo'
Chris@1 6500 _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'
Chris@1 6501 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
Chris@1 6502 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
Chris@1 6503 _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}'
Chris@1 6504 _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}'
Chris@1 6505 ;;
Chris@1 6506 *)
Chris@1 6507 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6508 ;;
Chris@1 6509 esac
Chris@1 6510 fi
Chris@1 6511 ;;
Chris@1 6512
Chris@1 6513 dgux*)
Chris@1 6514 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6515 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6516 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6517 ;;
Chris@1 6518
Chris@1 6519 freebsd1*)
Chris@1 6520 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6521 ;;
Chris@1 6522
Chris@1 6523 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@1 6524 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@1 6525 # does not break anything, and helps significantly (at the cost of a little
Chris@1 6526 # extra space).
Chris@1 6527 freebsd2.2*)
Chris@1 6528 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@1 6529 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 6530 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6531 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6532 ;;
Chris@1 6533
Chris@1 6534 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@1 6535 freebsd2*)
Chris@1 6536 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6537 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6538 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6539 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6540 ;;
Chris@1 6541
Chris@1 6542 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@1 6543 freebsd* | kfreebsd*-gnu | dragonfly*)
Chris@1 6544 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6545 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 6546 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6547 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6548 ;;
Chris@1 6549
Chris@1 6550 hpux9*)
Chris@1 6551 if test "$GCC" = yes; then
Chris@1 6552 _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'
Chris@1 6553 else
Chris@1 6554 _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'
Chris@1 6555 fi
Chris@1 6556 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 6557 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6558 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6559
Chris@1 6560 # hardcode_minus_L: Not really in the search PATH,
Chris@1 6561 # but as the default location of the library.
Chris@1 6562 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6563 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 6564 ;;
Chris@1 6565
Chris@1 6566 hpux10* | hpux11*)
Chris@1 6567 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
Chris@1 6568 case "$host_cpu" in
Chris@1 6569 hppa*64*|ia64*)
Chris@1 6570 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6571 ;;
Chris@1 6572 *)
Chris@1 6573 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6574 ;;
Chris@1 6575 esac
Chris@1 6576 else
Chris@1 6577 case "$host_cpu" in
Chris@1 6578 hppa*64*|ia64*)
Chris@1 6579 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6580 ;;
Chris@1 6581 *)
Chris@1 6582 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6583 ;;
Chris@1 6584 esac
Chris@1 6585 fi
Chris@1 6586 if test "$with_gnu_ld" = no; then
Chris@1 6587 case "$host_cpu" in
Chris@1 6588 hppa*64*)
Chris@1 6589 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 6590 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
Chris@1 6591 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6592 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 6593 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6594 ;;
Chris@1 6595 ia64*)
Chris@1 6596 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6597 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 6598 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6599
Chris@1 6600 # hardcode_minus_L: Not really in the search PATH,
Chris@1 6601 # but as the default location of the library.
Chris@1 6602 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6603 ;;
Chris@1 6604 *)
Chris@1 6605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@1 6606 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6607 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6608 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 6609
Chris@1 6610 # hardcode_minus_L: Not really in the search PATH,
Chris@1 6611 # but as the default location of the library.
Chris@1 6612 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6613 ;;
Chris@1 6614 esac
Chris@1 6615 fi
Chris@1 6616 ;;
Chris@1 6617
Chris@1 6618 irix5* | irix6* | nonstopux*)
Chris@1 6619 if test "$GCC" = yes; then
Chris@1 6620 _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'
Chris@1 6621 else
Chris@1 6622 _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'
Chris@1 6623 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
Chris@1 6624 fi
Chris@1 6625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 6626 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6627 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 6628 ;;
Chris@1 6629
Chris@1 6630 netbsd*)
Chris@1 6631 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
Chris@1 6632 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@1 6633 else
Chris@1 6634 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@1 6635 fi
Chris@1 6636 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 6637 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6638 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6639 ;;
Chris@1 6640
Chris@1 6641 newsos6)
Chris@1 6642 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6643 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6644 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 6645 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6646 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6647 ;;
Chris@1 6648
Chris@1 6649 openbsd*)
Chris@1 6650 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6651 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6652 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@1 6653 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6654 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
Chris@1 6655 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 6656 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@1 6657 else
Chris@1 6658 case $host_os in
Chris@1 6659 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
Chris@1 6660 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6661 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 6662 ;;
Chris@1 6663 *)
Chris@1 6664 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6665 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@1 6666 ;;
Chris@1 6667 esac
Chris@1 6668 fi
Chris@1 6669 ;;
Chris@1 6670
Chris@1 6671 os2*)
Chris@1 6672 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6673 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6674 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@1 6675 _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'
Chris@1 6676 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
Chris@1 6677 ;;
Chris@1 6678
Chris@1 6679 osf3*)
Chris@1 6680 if test "$GCC" = yes; then
Chris@1 6681 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@1 6682 _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'
Chris@1 6683 else
Chris@1 6684 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@1 6685 _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'
Chris@1 6686 fi
Chris@1 6687 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 6688 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6689 ;;
Chris@1 6690
Chris@1 6691 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@1 6692 if test "$GCC" = yes; then
Chris@1 6693 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@1 6694 _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'
Chris@1 6695 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@1 6696 else
Chris@1 6697 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@1 6698 _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'
Chris@1 6699 _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~
Chris@1 6700 $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'
Chris@1 6701
Chris@1 6702 # Both c and cxx compiler support -rpath directly
Chris@1 6703 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@1 6704 fi
Chris@1 6705 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@1 6706 ;;
Chris@1 6707
Chris@1 6708 sco3.2v5*)
Chris@1 6709 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6710 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6711 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
Chris@1 6712 runpath_var=LD_RUN_PATH
Chris@1 6713 hardcode_runpath_var=yes
Chris@1 6714 ;;
Chris@1 6715
Chris@1 6716 solaris*)
Chris@1 6717 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
Chris@1 6718 if test "$GCC" = yes; then
Chris@1 6719 wlarc='${wl}'
Chris@1 6720 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6721 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 6722 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
Chris@1 6723 else
Chris@1 6724 wlarc=''
Chris@1 6725 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6726 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 6727 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
Chris@1 6728 fi
Chris@1 6729 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@1 6730 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6731 case $host_os in
Chris@1 6732 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@1 6733 *)
Chris@1 6734 # The compiler driver will combine linker options so we
Chris@1 6735 # cannot just pass the convience library names through
Chris@1 6736 # without $wl, iff we do not link with $LD.
Chris@1 6737 # Luckily, gcc supports the same syntax we need for Sun Studio.
Chris@1 6738 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@1 6739 case $wlarc in
Chris@1 6740 '')
Chris@1 6741 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
Chris@1 6742 *)
Chris@1 6743 _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' ;;
Chris@1 6744 esac ;;
Chris@1 6745 esac
Chris@1 6746 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
Chris@1 6747 ;;
Chris@1 6748
Chris@1 6749 sunos4*)
Chris@1 6750 if test "x$host_vendor" = xsequent; then
Chris@1 6751 # Use $CC to link under sequent, because it throws in some extra .o
Chris@1 6752 # files that make .init and .fini sections work.
Chris@1 6753 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6754 else
Chris@1 6755 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6756 fi
Chris@1 6757 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6758 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6759 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
Chris@1 6760 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6761 ;;
Chris@1 6762
Chris@1 6763 sysv4)
Chris@1 6764 case $host_vendor in
Chris@1 6765 sni)
Chris@1 6766 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6767 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@1 6768 ;;
Chris@1 6769 siemens)
Chris@1 6770 ## LD is ld it makes a PLAMLIB
Chris@1 6771 ## CC just makes a GrossModule.
Chris@1 6772 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6773 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@1 6774 _LT_AC_TAGVAR(hardcode_direct, $1)=no
Chris@1 6775 ;;
Chris@1 6776 motorola)
Chris@1 6777 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6778 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@1 6779 ;;
Chris@1 6780 esac
Chris@1 6781 runpath_var='LD_RUN_PATH'
Chris@1 6782 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6783 ;;
Chris@1 6784
Chris@1 6785 sysv4.3*)
Chris@1 6786 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6787 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6788 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@1 6789 ;;
Chris@1 6790
Chris@1 6791 sysv4*MP*)
Chris@1 6792 if test -d /usr/nec; then
Chris@1 6793 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6794 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6795 runpath_var=LD_RUN_PATH
Chris@1 6796 hardcode_runpath_var=yes
Chris@1 6797 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
Chris@1 6798 fi
Chris@1 6799 ;;
Chris@1 6800
Chris@1 6801 sysv4.2uw2*)
Chris@1 6802 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6803 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Chris@1 6804 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
Chris@1 6805 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6806 hardcode_runpath_var=yes
Chris@1 6807 runpath_var=LD_RUN_PATH
Chris@1 6808 ;;
Chris@1 6809
Chris@1 6810 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
Chris@1 6811 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
Chris@1 6812 if test "$GCC" = yes; then
Chris@1 6813 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6814 else
Chris@1 6815 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@1 6816 fi
Chris@1 6817 runpath_var='LD_RUN_PATH'
Chris@1 6818 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6819 ;;
Chris@1 6820
Chris@1 6821 sysv5*)
Chris@1 6822 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
Chris@1 6823 # $CC -shared without GNU ld will not create a library from C++
Chris@1 6824 # object files and a static libstdc++, better avoid it by now
Chris@1 6825 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6826 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
Chris@1 6827 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
Chris@1 6828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@1 6829 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6830 runpath_var='LD_RUN_PATH'
Chris@1 6831 ;;
Chris@1 6832
Chris@1 6833 uts4*)
Chris@1 6834 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@1 6835 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@1 6836 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@1 6837 ;;
Chris@1 6838
Chris@1 6839 *)
Chris@1 6840 _LT_AC_TAGVAR(ld_shlibs, $1)=no
Chris@1 6841 ;;
Chris@1 6842 esac
Chris@1 6843 fi
Chris@1 6844 ])
Chris@1 6845 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
Chris@1 6846 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@1 6847
Chris@1 6848 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@1 6849 if test "$GCC" = yes; then
Chris@1 6850 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@1 6851 fi
Chris@1 6852
Chris@1 6853 #
Chris@1 6854 # Do we need to explicitly link libc?
Chris@1 6855 #
Chris@1 6856 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@1 6857 x|xyes)
Chris@1 6858 # Assume -lc should be added
Chris@1 6859 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@1 6860
Chris@1 6861 if test "$enable_shared" = yes && test "$GCC" = yes; then
Chris@1 6862 case $_LT_AC_TAGVAR(archive_cmds, $1) in
Chris@1 6863 *'~'*)
Chris@1 6864 # FIXME: we may have to deal with multi-command sequences.
Chris@1 6865 ;;
Chris@1 6866 '$CC '*)
Chris@1 6867 # Test whether the compiler implicitly links with -lc since on some
Chris@1 6868 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@1 6869 # to ld, don't add -lc before -lgcc.
Chris@1 6870 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
Chris@1 6871 $rm conftest*
Chris@1 6872 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@1 6873
Chris@1 6874 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@1 6875 soname=conftest
Chris@1 6876 lib=conftest
Chris@1 6877 libobjs=conftest.$ac_objext
Chris@1 6878 deplibs=
Chris@1 6879 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
Chris@1 6880 compiler_flags=-v
Chris@1 6881 linker_flags=-v
Chris@1 6882 verstring=
Chris@1 6883 output_objdir=.
Chris@1 6884 libname=conftest
Chris@1 6885 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
Chris@1 6886 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
Chris@1 6887 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
Chris@1 6888 then
Chris@1 6889 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@1 6890 else
Chris@1 6891 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@1 6892 fi
Chris@1 6893 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@1 6894 else
Chris@1 6895 cat conftest.err 1>&5
Chris@1 6896 fi
Chris@1 6897 $rm conftest*
Chris@1 6898 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
Chris@1 6899 ;;
Chris@1 6900 esac
Chris@1 6901 fi
Chris@1 6902 ;;
Chris@1 6903 esac
Chris@1 6904 ])# AC_LIBTOOL_PROG_LD_SHLIBS
Chris@1 6905
Chris@1 6906
Chris@1 6907 # _LT_AC_FILE_LTDLL_C
Chris@1 6908 # -------------------
Chris@1 6909 # Be careful that the start marker always follows a newline.
Chris@1 6910 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
Chris@1 6911 # /* ltdll.c starts here */
Chris@1 6912 # #define WIN32_LEAN_AND_MEAN
Chris@1 6913 # #include <windows.h>
Chris@1 6914 # #undef WIN32_LEAN_AND_MEAN
Chris@1 6915 # #include <stdio.h>
Chris@1 6916 #
Chris@1 6917 # #ifndef __CYGWIN__
Chris@1 6918 # # ifdef __CYGWIN32__
Chris@1 6919 # # define __CYGWIN__ __CYGWIN32__
Chris@1 6920 # # endif
Chris@1 6921 # #endif
Chris@1 6922 #
Chris@1 6923 # #ifdef __cplusplus
Chris@1 6924 # extern "C" {
Chris@1 6925 # #endif
Chris@1 6926 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
Chris@1 6927 # #ifdef __cplusplus
Chris@1 6928 # }
Chris@1 6929 # #endif
Chris@1 6930 #
Chris@1 6931 # #ifdef __CYGWIN__
Chris@1 6932 # #include <cygwin/cygwin_dll.h>
Chris@1 6933 # DECLARE_CYGWIN_DLL( DllMain );
Chris@1 6934 # #endif
Chris@1 6935 # HINSTANCE __hDllInstance_base;
Chris@1 6936 #
Chris@1 6937 # BOOL APIENTRY
Chris@1 6938 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
Chris@1 6939 # {
Chris@1 6940 # __hDllInstance_base = hInst;
Chris@1 6941 # return TRUE;
Chris@1 6942 # }
Chris@1 6943 # /* ltdll.c ends here */
Chris@1 6944 ])# _LT_AC_FILE_LTDLL_C
Chris@1 6945
Chris@1 6946
Chris@1 6947 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
Chris@1 6948 # ---------------------------------
Chris@1 6949 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
Chris@1 6950
Chris@1 6951
Chris@1 6952 # old names
Chris@1 6953 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
Chris@1 6954 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
Chris@1 6955 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
Chris@1 6956 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
Chris@1 6957 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
Chris@1 6958 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
Chris@1 6959 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
Chris@1 6960
Chris@1 6961 # This is just to silence aclocal about the macro not being used
Chris@1 6962 ifelse([AC_DISABLE_FAST_INSTALL])
Chris@1 6963
Chris@1 6964 AC_DEFUN([LT_AC_PROG_GCJ],
Chris@1 6965 [AC_CHECK_TOOL(GCJ, gcj, no)
Chris@1 6966 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
Chris@1 6967 AC_SUBST(GCJFLAGS)
Chris@1 6968 ])
Chris@1 6969
Chris@1 6970 AC_DEFUN([LT_AC_PROG_RC],
Chris@1 6971 [AC_CHECK_TOOL(RC, windres, no)
Chris@1 6972 ])
Chris@1 6973
Chris@1 6974 # NOTE: This macro has been submitted for inclusion into #
Chris@1 6975 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@1 6976 # a released version of Autoconf we should remove this #
Chris@1 6977 # macro and use it instead. #
Chris@1 6978 # LT_AC_PROG_SED
Chris@1 6979 # --------------
Chris@1 6980 # Check for a fully-functional sed program, that truncates
Chris@1 6981 # as few characters as possible. Prefer GNU sed if found.
Chris@1 6982 AC_DEFUN([LT_AC_PROG_SED],
Chris@1 6983 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@1 6984 AC_CACHE_VAL(lt_cv_path_SED,
Chris@1 6985 [# Loop through the user's path and test for sed and gsed.
Chris@1 6986 # Then use that list of sed's as ones to test for truncation.
Chris@1 6987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@1 6988 for as_dir in $PATH
Chris@1 6989 do
Chris@1 6990 IFS=$as_save_IFS
Chris@1 6991 test -z "$as_dir" && as_dir=.
Chris@1 6992 for lt_ac_prog in sed gsed; do
Chris@1 6993 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@1 6994 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@1 6995 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@1 6996 fi
Chris@1 6997 done
Chris@1 6998 done
Chris@1 6999 done
Chris@1 7000 lt_ac_max=0
Chris@1 7001 lt_ac_count=0
Chris@1 7002 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@1 7003 # along with /bin/sed that truncates output.
Chris@1 7004 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@1 7005 test ! -f $lt_ac_sed && continue
Chris@1 7006 cat /dev/null > conftest.in
Chris@1 7007 lt_ac_count=0
Chris@1 7008 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@1 7009 # Check for GNU sed and select it if it is found.
Chris@1 7010 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@1 7011 lt_cv_path_SED=$lt_ac_sed
Chris@1 7012 break
Chris@1 7013 fi
Chris@1 7014 while true; do
Chris@1 7015 cat conftest.in conftest.in >conftest.tmp
Chris@1 7016 mv conftest.tmp conftest.in
Chris@1 7017 cp conftest.in conftest.nl
Chris@1 7018 echo >>conftest.nl
Chris@1 7019 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@1 7020 cmp -s conftest.out conftest.nl || break
Chris@1 7021 # 10000 chars as input seems more than enough
Chris@1 7022 test $lt_ac_count -gt 10 && break
Chris@1 7023 lt_ac_count=`expr $lt_ac_count + 1`
Chris@1 7024 if test $lt_ac_count -gt $lt_ac_max; then
Chris@1 7025 lt_ac_max=$lt_ac_count
Chris@1 7026 lt_cv_path_SED=$lt_ac_sed
Chris@1 7027 fi
Chris@1 7028 done
Chris@1 7029 done
Chris@1 7030 ])
Chris@1 7031 SED=$lt_cv_path_SED
Chris@1 7032 AC_MSG_RESULT([$SED])
Chris@1 7033 ])
Chris@1 7034
Chris@1 7035 # Figure out how to run the assembler. -*- Autoconf -*-
Chris@1 7036
Chris@1 7037 # serial 2
Chris@1 7038
Chris@1 7039 # Copyright 2001 Free Software Foundation, Inc.
Chris@1 7040
Chris@1 7041 # This program is free software; you can redistribute it and/or modify
Chris@1 7042 # it under the terms of the GNU General Public License as published by
Chris@1 7043 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 7044 # any later version.
Chris@1 7045
Chris@1 7046 # This program is distributed in the hope that it will be useful,
Chris@1 7047 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 7048 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 7049 # GNU General Public License for more details.
Chris@1 7050
Chris@1 7051 # You should have received a copy of the GNU General Public License
Chris@1 7052 # along with this program; if not, write to the Free Software
Chris@1 7053 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 7054 # 02111-1307, USA.
Chris@1 7055
Chris@1 7056 # AM_PROG_AS
Chris@1 7057 # ----------
Chris@1 7058 AC_DEFUN([AM_PROG_AS],
Chris@1 7059 [# By default we simply use the C compiler to build assembly code.
Chris@1 7060 AC_REQUIRE([AC_PROG_CC])
Chris@1 7061 : ${CCAS='$(CC)'}
Chris@1 7062 # Set ASFLAGS if not already set.
Chris@1 7063 : ${CCASFLAGS='$(CFLAGS)'}
Chris@1 7064 AC_SUBST(CCAS)
Chris@1 7065 AC_SUBST(CCASFLAGS)])
Chris@1 7066
Chris@1 7067 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
Chris@1 7068
Chris@1 7069 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
Chris@1 7070
Chris@1 7071 # This program is free software; you can redistribute it and/or modify
Chris@1 7072 # it under the terms of the GNU General Public License as published by
Chris@1 7073 # the Free Software Foundation; either version 2, or (at your option)
Chris@1 7074 # any later version.
Chris@1 7075
Chris@1 7076 # This program is distributed in the hope that it will be useful,
Chris@1 7077 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@1 7078 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@1 7079 # GNU General Public License for more details.
Chris@1 7080
Chris@1 7081 # You should have received a copy of the GNU General Public License
Chris@1 7082 # along with this program; if not, write to the Free Software
Chris@1 7083 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Chris@1 7084 # 02111-1307, USA.
Chris@1 7085
Chris@1 7086 AC_PREREQ([2.52])
Chris@1 7087
Chris@1 7088 # serial 6
Chris@1 7089
Chris@1 7090 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
Chris@1 7091 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
Chris@1 7092
Chris@1 7093 # CFLAGS and library paths for XMMS
Chris@1 7094 # written 15 December 1999 by Ben Gertzfield <che@debian.org>
Chris@1 7095
Chris@1 7096 dnl Usage:
Chris@1 7097 dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
Chris@1 7098 dnl
Chris@1 7099 dnl Example:
Chris@1 7100 dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***]))
Chris@1 7101 dnl
Chris@1 7102 dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR,
Chris@1 7103 dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR,
Chris@1 7104 dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR,
Chris@1 7105 dnl and XMMS_VERSION for your plugin pleasure.
Chris@1 7106 dnl
Chris@1 7107
Chris@1 7108 dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]])
Chris@1 7109 AC_DEFUN([XMMS_TEST_VERSION], [
Chris@1 7110
Chris@1 7111 # Determine which version number is greater. Prints 2 to stdout if
Chris@1 7112 # the second number is greater, 1 if the first number is greater,
Chris@1 7113 # 0 if the numbers are equal.
Chris@1 7114
Chris@1 7115 # Written 15 December 1999 by Ben Gertzfield <che@debian.org>
Chris@1 7116 # Revised 15 December 1999 by Jim Monty <monty@primenet.com>
Chris@1 7117
Chris@1 7118 AC_PROG_AWK
Chris@1 7119 xmms_got_version=[` $AWK ' \
Chris@1 7120 BEGIN { \
Chris@1 7121 print vercmp(ARGV[1], ARGV[2]); \
Chris@1 7122 } \
Chris@1 7123 \
Chris@1 7124 function vercmp(ver1, ver2, ver1arr, ver2arr, \
Chris@1 7125 ver1len, ver2len, \
Chris@1 7126 ver1int, ver2int, len, i, p) { \
Chris@1 7127 \
Chris@1 7128 ver1len = split(ver1, ver1arr, /\./); \
Chris@1 7129 ver2len = split(ver2, ver2arr, /\./); \
Chris@1 7130 \
Chris@1 7131 len = ver1len > ver2len ? ver1len : ver2len; \
Chris@1 7132 \
Chris@1 7133 for (i = 1; i <= len; i++) { \
Chris@1 7134 p = 1000 ^ (len - i); \
Chris@1 7135 ver1int += ver1arr[i] * p; \
Chris@1 7136 ver2int += ver2arr[i] * p; \
Chris@1 7137 } \
Chris@1 7138 \
Chris@1 7139 if (ver1int < ver2int) \
Chris@1 7140 return 2; \
Chris@1 7141 else if (ver1int > ver2int) \
Chris@1 7142 return 1; \
Chris@1 7143 else \
Chris@1 7144 return 0; \
Chris@1 7145 }' $1 $2`]
Chris@1 7146
Chris@1 7147 if test $xmms_got_version -eq 2; then # failure
Chris@1 7148 ifelse([$4], , :, $4)
Chris@1 7149 else # success!
Chris@1 7150 ifelse([$3], , :, $3)
Chris@1 7151 fi
Chris@1 7152 ])
Chris@1 7153
Chris@1 7154 AC_DEFUN([AM_PATH_XMMS],
Chris@1 7155 [
Chris@1 7156 AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)],
Chris@1 7157 xmms_config_prefix="$withval", xmms_config_prefix="")
Chris@1 7158 AC_ARG_WITH(xmms-exec-prefix,[ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)],
Chris@1 7159 xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="")
Chris@1 7160
Chris@1 7161 if test x$xmms_config_exec_prefix != x; then
Chris@1 7162 xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix"
Chris@1 7163 if test x${XMMS_CONFIG+set} != xset; then
Chris@1 7164 XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config
Chris@1 7165 fi
Chris@1 7166 fi
Chris@1 7167
Chris@1 7168 if test x$xmms_config_prefix != x; then
Chris@1 7169 xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix"
Chris@1 7170 if test x${XMMS_CONFIG+set} != xset; then
Chris@1 7171 XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config
Chris@1 7172 fi
Chris@1 7173 fi
Chris@1 7174
Chris@1 7175 AC_PATH_PROG(XMMS_CONFIG, xmms-config, no)
Chris@1 7176 min_xmms_version=ifelse([$1], ,0.9.5.1, $1)
Chris@1 7177
Chris@1 7178 if test "$XMMS_CONFIG" = "no"; then
Chris@1 7179 no_xmms=yes
Chris@1 7180 else
Chris@1 7181 XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags`
Chris@1 7182 XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs`
Chris@1 7183 XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version`
Chris@1 7184 XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir`
Chris@1 7185 XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir`
Chris@1 7186 XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \
Chris@1 7187 --visualization-plugin-dir`
Chris@1 7188 XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir`
Chris@1 7189 XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir`
Chris@1 7190 XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir`
Chris@1 7191 XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir`
Chris@1 7192
Chris@1 7193 XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version)
Chris@1 7194 fi
Chris@1 7195
Chris@1 7196 AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version)
Chris@1 7197
Chris@1 7198 if test "x$no_xmms" = x; then
Chris@1 7199 AC_MSG_RESULT(yes)
Chris@1 7200 ifelse([$2], , :, [$2])
Chris@1 7201 else
Chris@1 7202 AC_MSG_RESULT(no)
Chris@1 7203
Chris@1 7204 if test "$XMMS_CONFIG" = "no" ; then
Chris@1 7205 echo "*** The xmms-config script installed by XMMS could not be found."
Chris@1 7206 echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in"
Chris@1 7207 echo "*** your path, or set the XMMS_CONFIG environment variable to the"
Chris@1 7208 echo "*** full path to xmms-config."
Chris@1 7209 else
Chris@1 7210 if test "$no_xmms" = "version"; then
Chris@1 7211 echo "*** An old version of XMMS, $XMMS_VERSION, was found."
Chris@1 7212 echo "*** You need a version of XMMS newer than $min_xmms_version."
Chris@1 7213 echo "*** The latest version of XMMS is always available from"
Chris@1 7214 echo "*** http://www.xmms.org/"
Chris@1 7215 echo "***"
Chris@1 7216
Chris@1 7217 echo "*** If you have already installed a sufficiently new version, this error"
Chris@1 7218 echo "*** probably means that the wrong copy of the xmms-config shell script is"
Chris@1 7219 echo "*** being found. The easiest way to fix this is to remove the old version"
Chris@1 7220 echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the"
Chris@1 7221 echo "*** correct copy of xmms-config. (In this case, you will have to"
Chris@1 7222 echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf"
Chris@1 7223 echo "*** so that the correct libraries are found at run-time)"
Chris@1 7224 fi
Chris@1 7225 fi
Chris@1 7226 XMMS_CFLAGS=""
Chris@1 7227 XMMS_LIBS=""
Chris@1 7228 ifelse([$3], , :, [$3])
Chris@1 7229 fi
Chris@1 7230 AC_SUBST(XMMS_CFLAGS)
Chris@1 7231 AC_SUBST(XMMS_LIBS)
Chris@1 7232 AC_SUBST(XMMS_VERSION)
Chris@1 7233 AC_SUBST(XMMS_DATA_DIR)
Chris@1 7234 AC_SUBST(XMMS_PLUGIN_DIR)
Chris@1 7235 AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR)
Chris@1 7236 AC_SUBST(XMMS_INPUT_PLUGIN_DIR)
Chris@1 7237 AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR)
Chris@1 7238 AC_SUBST(XMMS_GENERAL_PLUGIN_DIR)
Chris@1 7239 AC_SUBST(XMMS_EFFECT_PLUGIN_DIR)
Chris@1 7240 ])
Chris@1 7241
Chris@1 7242 # Configure paths for libogg
Chris@1 7243 # Jack Moffitt <jack@icecast.org> 10-21-2000
Chris@1 7244 # Shamelessly stolen from Owen Taylor and Manish Singh
Chris@1 7245
Chris@1 7246 dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Chris@1 7247 dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
Chris@1 7248 dnl
Chris@1 7249 AC_DEFUN([XIPH_PATH_OGG],
Chris@1 7250 [dnl
Chris@1 7251 dnl Get the cflags and libraries
Chris@1 7252 dnl
Chris@1 7253 AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
Chris@1 7254 AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
Chris@1 7255 AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
Chris@1 7256 AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
Chris@1 7257
Chris@1 7258 if test "x$ogg_libraries" != "x" ; then
Chris@1 7259 OGG_LIBS="-L$ogg_libraries"
Chris@1 7260 elif test "x$ogg_prefix" != "x" ; then
Chris@1 7261 OGG_LIBS="-L$ogg_prefix/lib"
Chris@1 7262 elif test "x$prefix" != "xNONE" ; then
Chris@1 7263 OGG_LIBS="-L$prefix/lib"
Chris@1 7264 fi
Chris@1 7265
Chris@1 7266 OGG_LIBS="$OGG_LIBS -logg"
Chris@1 7267
Chris@1 7268 if test "x$ogg_includes" != "x" ; then
Chris@1 7269 OGG_CFLAGS="-I$ogg_includes"
Chris@1 7270 elif test "x$ogg_prefix" != "x" ; then
Chris@1 7271 OGG_CFLAGS="-I$ogg_prefix/include"
Chris@1 7272 elif test "x$prefix" != "xNONE"; then
Chris@1 7273 OGG_CFLAGS="-I$prefix/include"
Chris@1 7274 fi
Chris@1 7275
Chris@1 7276 AC_MSG_CHECKING(for Ogg)
Chris@1 7277 no_ogg=""
Chris@1 7278
Chris@1 7279
Chris@1 7280 if test "x$enable_oggtest" = "xyes" ; then
Chris@1 7281 ac_save_CFLAGS="$CFLAGS"
Chris@1 7282 ac_save_LIBS="$LIBS"
Chris@1 7283 CFLAGS="$CFLAGS $OGG_CFLAGS"
Chris@1 7284 LIBS="$LIBS $OGG_LIBS"
Chris@1 7285 dnl
Chris@1 7286 dnl Now check if the installed Ogg is sufficiently new.
Chris@1 7287 dnl
Chris@1 7288 rm -f conf.oggtest
Chris@1 7289 AC_TRY_RUN([
Chris@1 7290 #include <stdio.h>
Chris@1 7291 #include <stdlib.h>
Chris@1 7292 #include <string.h>
Chris@1 7293 #include <ogg/ogg.h>
Chris@1 7294
Chris@1 7295 int main ()
Chris@1 7296 {
Chris@1 7297 system("touch conf.oggtest");
Chris@1 7298 return 0;
Chris@1 7299 }
Chris@1 7300
Chris@1 7301 ],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
Chris@1 7302 CFLAGS="$ac_save_CFLAGS"
Chris@1 7303 LIBS="$ac_save_LIBS"
Chris@1 7304 fi
Chris@1 7305
Chris@1 7306 if test "x$no_ogg" = "x" ; then
Chris@1 7307 AC_MSG_RESULT(yes)
Chris@1 7308 ifelse([$1], , :, [$1])
Chris@1 7309 else
Chris@1 7310 AC_MSG_RESULT(no)
Chris@1 7311 if test -f conf.oggtest ; then
Chris@1 7312 :
Chris@1 7313 else
Chris@1 7314 echo "*** Could not run Ogg test program, checking why..."
Chris@1 7315 CFLAGS="$CFLAGS $OGG_CFLAGS"
Chris@1 7316 LIBS="$LIBS $OGG_LIBS"
Chris@1 7317 AC_TRY_LINK([
Chris@1 7318 #include <stdio.h>
Chris@1 7319 #include <ogg/ogg.h>
Chris@1 7320 ], [ return 0; ],
Chris@1 7321 [ echo "*** The test program compiled, but did not run. This usually means"
Chris@1 7322 echo "*** that the run-time linker is not finding Ogg or finding the wrong"
Chris@1 7323 echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
Chris@1 7324 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
Chris@1 7325 echo "*** to the installed location Also, make sure you have run ldconfig if that"
Chris@1 7326 echo "*** is required on your system"
Chris@1 7327 echo "***"
Chris@1 7328 echo "*** If you have an old version installed, it is best to remove it, although"
Chris@1 7329 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
Chris@1 7330 [ echo "*** The test program failed to compile or link. See the file config.log for the"
Chris@1 7331 echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
Chris@1 7332 echo "*** or that you have moved Ogg since it was installed." ])
Chris@1 7333 CFLAGS="$ac_save_CFLAGS"
Chris@1 7334 LIBS="$ac_save_LIBS"
Chris@1 7335 fi
Chris@1 7336 OGG_CFLAGS=""
Chris@1 7337 OGG_LIBS=""
Chris@1 7338 ifelse([$2], , :, [$2])
Chris@1 7339 fi
Chris@1 7340 AC_SUBST(OGG_CFLAGS)
Chris@1 7341 AC_SUBST(OGG_LIBS)
Chris@1 7342 rm -f conf.oggtest
Chris@1 7343 ])
Chris@1 7344
Chris@1 7345 # iconv.m4 serial AM4 (gettext-0.11.3)
Chris@1 7346 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
Chris@1 7347 dnl This file is free software; the Free Software Foundation
Chris@1 7348 dnl gives unlimited permission to copy and/or distribute it,
Chris@1 7349 dnl with or without modifications, as long as this notice is preserved.
Chris@1 7350
Chris@1 7351 dnl From Bruno Haible.
Chris@1 7352
Chris@1 7353 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
Chris@1 7354 [
Chris@1 7355 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
Chris@1 7356 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Chris@1 7357 AC_REQUIRE([AC_LIB_RPATH])
Chris@1 7358
Chris@1 7359 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
Chris@1 7360 dnl accordingly.
Chris@1 7361 AC_LIB_LINKFLAGS_BODY([iconv])
Chris@1 7362 ])
Chris@1 7363
Chris@1 7364 AC_DEFUN([AM_ICONV_LINK],
Chris@1 7365 [
Chris@1 7366 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
Chris@1 7367 dnl those with the standalone portable GNU libiconv installed).
Chris@1 7368
Chris@1 7369 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
Chris@1 7370 dnl accordingly.
Chris@1 7371 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
Chris@1 7372
Chris@1 7373 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
Chris@1 7374 dnl because if the user has installed libiconv and not disabled its use
Chris@1 7375 dnl via --without-libiconv-prefix, he wants to use it. The first
Chris@1 7376 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
Chris@1 7377 am_save_CPPFLAGS="$CPPFLAGS"
Chris@1 7378 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
Chris@1 7379
Chris@1 7380 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
Chris@1 7381 am_cv_func_iconv="no, consider installing GNU libiconv"
Chris@1 7382 am_cv_lib_iconv=no
Chris@1 7383 AC_TRY_LINK([#include <stdlib.h>
Chris@1 7384 #include <iconv.h>],
Chris@1 7385 [iconv_t cd = iconv_open("","");
Chris@1 7386 iconv(cd,NULL,NULL,NULL,NULL);
Chris@1 7387 iconv_close(cd);],
Chris@1 7388 am_cv_func_iconv=yes)
Chris@1 7389 if test "$am_cv_func_iconv" != yes; then
Chris@1 7390 am_save_LIBS="$LIBS"
Chris@1 7391 LIBS="$LIBS $LIBICONV"
Chris@1 7392 AC_TRY_LINK([#include <stdlib.h>
Chris@1 7393 #include <iconv.h>],
Chris@1 7394 [iconv_t cd = iconv_open("","");
Chris@1 7395 iconv(cd,NULL,NULL,NULL,NULL);
Chris@1 7396 iconv_close(cd);],
Chris@1 7397 am_cv_lib_iconv=yes
Chris@1 7398 am_cv_func_iconv=yes)
Chris@1 7399 LIBS="$am_save_LIBS"
Chris@1 7400 fi
Chris@1 7401 ])
Chris@1 7402 if test "$am_cv_func_iconv" = yes; then
Chris@1 7403 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
Chris@1 7404 fi
Chris@1 7405 if test "$am_cv_lib_iconv" = yes; then
Chris@1 7406 AC_MSG_CHECKING([how to link with libiconv])
Chris@1 7407 AC_MSG_RESULT([$LIBICONV])
Chris@1 7408 else
Chris@1 7409 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
Chris@1 7410 dnl either.
Chris@1 7411 CPPFLAGS="$am_save_CPPFLAGS"
Chris@1 7412 LIBICONV=
Chris@1 7413 LTLIBICONV=
Chris@1 7414 fi
Chris@1 7415 AC_SUBST(LIBICONV)
Chris@1 7416 AC_SUBST(LTLIBICONV)
Chris@1 7417 ])
Chris@1 7418
Chris@1 7419 AC_DEFUN([AM_ICONV],
Chris@1 7420 [
Chris@1 7421 AM_ICONV_LINK
Chris@1 7422 if test "$am_cv_func_iconv" = yes; then
Chris@1 7423 AC_MSG_CHECKING([for iconv declaration])
Chris@1 7424 AC_CACHE_VAL(am_cv_proto_iconv, [
Chris@1 7425 AC_TRY_COMPILE([
Chris@1 7426 #include <stdlib.h>
Chris@1 7427 #include <iconv.h>
Chris@1 7428 extern
Chris@1 7429 #ifdef __cplusplus
Chris@1 7430 "C"
Chris@1 7431 #endif
Chris@1 7432 #if defined(__STDC__) || defined(__cplusplus)
Chris@1 7433 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
Chris@1 7434 #else
Chris@1 7435 size_t iconv();
Chris@1 7436 #endif
Chris@1 7437 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
Chris@1 7438 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
Chris@1 7439 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
Chris@1 7440 AC_MSG_RESULT([$]{ac_t:-
Chris@1 7441 }[$]am_cv_proto_iconv)
Chris@1 7442 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
Chris@1 7443 [Define as const if the declaration of iconv() needs const.])
Chris@1 7444 fi
Chris@1 7445 ])
Chris@1 7446
Chris@1 7447 # lib-prefix.m4 serial 4 (gettext-0.14.2)
Chris@1 7448 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
Chris@1 7449 dnl This file is free software; the Free Software Foundation
Chris@1 7450 dnl gives unlimited permission to copy and/or distribute it,
Chris@1 7451 dnl with or without modifications, as long as this notice is preserved.
Chris@1 7452
Chris@1 7453 dnl From Bruno Haible.
Chris@1 7454
Chris@1 7455 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
Chris@1 7456 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
Chris@1 7457 dnl require excessive bracketing.
Chris@1 7458 ifdef([AC_HELP_STRING],
Chris@1 7459 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
Chris@1 7460 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
Chris@1 7461
Chris@1 7462 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
Chris@1 7463 dnl to access previously installed libraries. The basic assumption is that
Chris@1 7464 dnl a user will want packages to use other packages he previously installed
Chris@1 7465 dnl with the same --prefix option.
Chris@1 7466 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
Chris@1 7467 dnl libraries, but is otherwise very convenient.
Chris@1 7468 AC_DEFUN([AC_LIB_PREFIX],
Chris@1 7469 [
Chris@1 7470 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
Chris@1 7471 AC_REQUIRE([AC_PROG_CC])
Chris@1 7472 AC_REQUIRE([AC_CANONICAL_HOST])
Chris@1 7473 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Chris@1 7474 dnl By default, look in $includedir and $libdir.
Chris@1 7475 use_additional=yes
Chris@1 7476 AC_LIB_WITH_FINAL_PREFIX([
Chris@1 7477 eval additional_includedir=\"$includedir\"
Chris@1 7478 eval additional_libdir=\"$libdir\"
Chris@1 7479 ])
Chris@1 7480 AC_LIB_ARG_WITH([lib-prefix],
Chris@1 7481 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
Chris@1 7482 --without-lib-prefix don't search for libraries in includedir and libdir],
Chris@1 7483 [
Chris@1 7484 if test "X$withval" = "Xno"; then
Chris@1 7485 use_additional=no
Chris@1 7486 else
Chris@1 7487 if test "X$withval" = "X"; then
Chris@1 7488 AC_LIB_WITH_FINAL_PREFIX([
Chris@1 7489 eval additional_includedir=\"$includedir\"
Chris@1 7490 eval additional_libdir=\"$libdir\"
Chris@1 7491 ])
Chris@1 7492 else
Chris@1 7493 additional_includedir="$withval/include"
Chris@1 7494 additional_libdir="$withval/lib"
Chris@1 7495 fi
Chris@1 7496 fi
Chris@1 7497 ])
Chris@1 7498 if test $use_additional = yes; then
Chris@1 7499 dnl Potentially add $additional_includedir to $CPPFLAGS.
Chris@1 7500 dnl But don't add it
Chris@1 7501 dnl 1. if it's the standard /usr/include,
Chris@1 7502 dnl 2. if it's already present in $CPPFLAGS,
Chris@1 7503 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
Chris@1 7504 dnl 4. if it doesn't exist as a directory.
Chris@1 7505 if test "X$additional_includedir" != "X/usr/include"; then
Chris@1 7506 haveit=
Chris@1 7507 for x in $CPPFLAGS; do
Chris@1 7508 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 7509 if test "X$x" = "X-I$additional_includedir"; then
Chris@1 7510 haveit=yes
Chris@1 7511 break
Chris@1 7512 fi
Chris@1 7513 done
Chris@1 7514 if test -z "$haveit"; then
Chris@1 7515 if test "X$additional_includedir" = "X/usr/local/include"; then
Chris@1 7516 if test -n "$GCC"; then
Chris@1 7517 case $host_os in
Chris@1 7518 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Chris@1 7519 esac
Chris@1 7520 fi
Chris@1 7521 fi
Chris@1 7522 if test -z "$haveit"; then
Chris@1 7523 if test -d "$additional_includedir"; then
Chris@1 7524 dnl Really add $additional_includedir to $CPPFLAGS.
Chris@1 7525 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
Chris@1 7526 fi
Chris@1 7527 fi
Chris@1 7528 fi
Chris@1 7529 fi
Chris@1 7530 dnl Potentially add $additional_libdir to $LDFLAGS.
Chris@1 7531 dnl But don't add it
Chris@1 7532 dnl 1. if it's the standard /usr/lib,
Chris@1 7533 dnl 2. if it's already present in $LDFLAGS,
Chris@1 7534 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
Chris@1 7535 dnl 4. if it doesn't exist as a directory.
Chris@1 7536 if test "X$additional_libdir" != "X/usr/lib"; then
Chris@1 7537 haveit=
Chris@1 7538 for x in $LDFLAGS; do
Chris@1 7539 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 7540 if test "X$x" = "X-L$additional_libdir"; then
Chris@1 7541 haveit=yes
Chris@1 7542 break
Chris@1 7543 fi
Chris@1 7544 done
Chris@1 7545 if test -z "$haveit"; then
Chris@1 7546 if test "X$additional_libdir" = "X/usr/local/lib"; then
Chris@1 7547 if test -n "$GCC"; then
Chris@1 7548 case $host_os in
Chris@1 7549 linux*) haveit=yes;;
Chris@1 7550 esac
Chris@1 7551 fi
Chris@1 7552 fi
Chris@1 7553 if test -z "$haveit"; then
Chris@1 7554 if test -d "$additional_libdir"; then
Chris@1 7555 dnl Really add $additional_libdir to $LDFLAGS.
Chris@1 7556 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
Chris@1 7557 fi
Chris@1 7558 fi
Chris@1 7559 fi
Chris@1 7560 fi
Chris@1 7561 fi
Chris@1 7562 ])
Chris@1 7563
Chris@1 7564 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
Chris@1 7565 dnl acl_final_exec_prefix, containing the values to which $prefix and
Chris@1 7566 dnl $exec_prefix will expand at the end of the configure script.
Chris@1 7567 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
Chris@1 7568 [
Chris@1 7569 dnl Unfortunately, prefix and exec_prefix get only finally determined
Chris@1 7570 dnl at the end of configure.
Chris@1 7571 if test "X$prefix" = "XNONE"; then
Chris@1 7572 acl_final_prefix="$ac_default_prefix"
Chris@1 7573 else
Chris@1 7574 acl_final_prefix="$prefix"
Chris@1 7575 fi
Chris@1 7576 if test "X$exec_prefix" = "XNONE"; then
Chris@1 7577 acl_final_exec_prefix='${prefix}'
Chris@1 7578 else
Chris@1 7579 acl_final_exec_prefix="$exec_prefix"
Chris@1 7580 fi
Chris@1 7581 acl_save_prefix="$prefix"
Chris@1 7582 prefix="$acl_final_prefix"
Chris@1 7583 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
Chris@1 7584 prefix="$acl_save_prefix"
Chris@1 7585 ])
Chris@1 7586
Chris@1 7587 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
Chris@1 7588 dnl variables prefix and exec_prefix bound to the values they will have
Chris@1 7589 dnl at the end of the configure script.
Chris@1 7590 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
Chris@1 7591 [
Chris@1 7592 acl_save_prefix="$prefix"
Chris@1 7593 prefix="$acl_final_prefix"
Chris@1 7594 acl_save_exec_prefix="$exec_prefix"
Chris@1 7595 exec_prefix="$acl_final_exec_prefix"
Chris@1 7596 $1
Chris@1 7597 exec_prefix="$acl_save_exec_prefix"
Chris@1 7598 prefix="$acl_save_prefix"
Chris@1 7599 ])
Chris@1 7600
Chris@1 7601 # lib-link.m4 serial 6 (gettext-0.14.3)
Chris@1 7602 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
Chris@1 7603 dnl This file is free software; the Free Software Foundation
Chris@1 7604 dnl gives unlimited permission to copy and/or distribute it,
Chris@1 7605 dnl with or without modifications, as long as this notice is preserved.
Chris@1 7606
Chris@1 7607 dnl From Bruno Haible.
Chris@1 7608
Chris@1 7609 AC_PREREQ(2.50)
Chris@1 7610
Chris@1 7611 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
Chris@1 7612 dnl the libraries corresponding to explicit and implicit dependencies.
Chris@1 7613 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
Chris@1 7614 dnl augments the CPPFLAGS variable.
Chris@1 7615 AC_DEFUN([AC_LIB_LINKFLAGS],
Chris@1 7616 [
Chris@1 7617 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Chris@1 7618 AC_REQUIRE([AC_LIB_RPATH])
Chris@1 7619 define([Name],[translit([$1],[./-], [___])])
Chris@1 7620 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
Chris@1 7621 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
Chris@1 7622 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
Chris@1 7623 AC_LIB_LINKFLAGS_BODY([$1], [$2])
Chris@1 7624 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
Chris@1 7625 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
Chris@1 7626 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
Chris@1 7627 ])
Chris@1 7628 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
Chris@1 7629 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
Chris@1 7630 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
Chris@1 7631 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
Chris@1 7632 AC_SUBST([LIB]NAME)
Chris@1 7633 AC_SUBST([LTLIB]NAME)
Chris@1 7634 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
Chris@1 7635 dnl results of this search when this library appears as a dependency.
Chris@1 7636 HAVE_LIB[]NAME=yes
Chris@1 7637 undefine([Name])
Chris@1 7638 undefine([NAME])
Chris@1 7639 ])
Chris@1 7640
Chris@1 7641 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
Chris@1 7642 dnl searches for libname and the libraries corresponding to explicit and
Chris@1 7643 dnl implicit dependencies, together with the specified include files and
Chris@1 7644 dnl the ability to compile and link the specified testcode. If found, it
Chris@1 7645 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
Chris@1 7646 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
Chris@1 7647 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
Chris@1 7648 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
Chris@1 7649 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
Chris@1 7650 [
Chris@1 7651 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Chris@1 7652 AC_REQUIRE([AC_LIB_RPATH])
Chris@1 7653 define([Name],[translit([$1],[./-], [___])])
Chris@1 7654 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
Chris@1 7655 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
Chris@1 7656
Chris@1 7657 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
Chris@1 7658 dnl accordingly.
Chris@1 7659 AC_LIB_LINKFLAGS_BODY([$1], [$2])
Chris@1 7660
Chris@1 7661 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
Chris@1 7662 dnl because if the user has installed lib[]Name and not disabled its use
Chris@1 7663 dnl via --without-lib[]Name-prefix, he wants to use it.
Chris@1 7664 ac_save_CPPFLAGS="$CPPFLAGS"
Chris@1 7665 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
Chris@1 7666
Chris@1 7667 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
Chris@1 7668 ac_save_LIBS="$LIBS"
Chris@1 7669 LIBS="$LIBS $LIB[]NAME"
Chris@1 7670 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
Chris@1 7671 LIBS="$ac_save_LIBS"
Chris@1 7672 ])
Chris@1 7673 if test "$ac_cv_lib[]Name" = yes; then
Chris@1 7674 HAVE_LIB[]NAME=yes
Chris@1 7675 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
Chris@1 7676 AC_MSG_CHECKING([how to link with lib[]$1])
Chris@1 7677 AC_MSG_RESULT([$LIB[]NAME])
Chris@1 7678 else
Chris@1 7679 HAVE_LIB[]NAME=no
Chris@1 7680 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
Chris@1 7681 dnl $INC[]NAME either.
Chris@1 7682 CPPFLAGS="$ac_save_CPPFLAGS"
Chris@1 7683 LIB[]NAME=
Chris@1 7684 LTLIB[]NAME=
Chris@1 7685 fi
Chris@1 7686 AC_SUBST([HAVE_LIB]NAME)
Chris@1 7687 AC_SUBST([LIB]NAME)
Chris@1 7688 AC_SUBST([LTLIB]NAME)
Chris@1 7689 undefine([Name])
Chris@1 7690 undefine([NAME])
Chris@1 7691 ])
Chris@1 7692
Chris@1 7693 dnl Determine the platform dependent parameters needed to use rpath:
Chris@1 7694 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
Chris@1 7695 dnl hardcode_direct, hardcode_minus_L.
Chris@1 7696 AC_DEFUN([AC_LIB_RPATH],
Chris@1 7697 [
Chris@1 7698 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
Chris@1 7699 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
Chris@1 7700 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
Chris@1 7701 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
Chris@1 7702 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
Chris@1 7703 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
Chris@1 7704 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
Chris@1 7705 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
Chris@1 7706 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
Chris@1 7707 . ./conftest.sh
Chris@1 7708 rm -f ./conftest.sh
Chris@1 7709 acl_cv_rpath=done
Chris@1 7710 ])
Chris@1 7711 wl="$acl_cv_wl"
Chris@1 7712 libext="$acl_cv_libext"
Chris@1 7713 shlibext="$acl_cv_shlibext"
Chris@1 7714 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
Chris@1 7715 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
Chris@1 7716 hardcode_direct="$acl_cv_hardcode_direct"
Chris@1 7717 hardcode_minus_L="$acl_cv_hardcode_minus_L"
Chris@1 7718 dnl Determine whether the user wants rpath handling at all.
Chris@1 7719 AC_ARG_ENABLE(rpath,
Chris@1 7720 [ --disable-rpath do not hardcode runtime library paths],
Chris@1 7721 :, enable_rpath=yes)
Chris@1 7722 ])
Chris@1 7723
Chris@1 7724 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
Chris@1 7725 dnl the libraries corresponding to explicit and implicit dependencies.
Chris@1 7726 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
Chris@1 7727 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
Chris@1 7728 [
Chris@1 7729 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
Chris@1 7730 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
Chris@1 7731 dnl By default, look in $includedir and $libdir.
Chris@1 7732 use_additional=yes
Chris@1 7733 AC_LIB_WITH_FINAL_PREFIX([
Chris@1 7734 eval additional_includedir=\"$includedir\"
Chris@1 7735 eval additional_libdir=\"$libdir\"
Chris@1 7736 ])
Chris@1 7737 AC_LIB_ARG_WITH([lib$1-prefix],
Chris@1 7738 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
Chris@1 7739 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
Chris@1 7740 [
Chris@1 7741 if test "X$withval" = "Xno"; then
Chris@1 7742 use_additional=no
Chris@1 7743 else
Chris@1 7744 if test "X$withval" = "X"; then
Chris@1 7745 AC_LIB_WITH_FINAL_PREFIX([
Chris@1 7746 eval additional_includedir=\"$includedir\"
Chris@1 7747 eval additional_libdir=\"$libdir\"
Chris@1 7748 ])
Chris@1 7749 else
Chris@1 7750 additional_includedir="$withval/include"
Chris@1 7751 additional_libdir="$withval/lib"
Chris@1 7752 fi
Chris@1 7753 fi
Chris@1 7754 ])
Chris@1 7755 dnl Search the library and its dependencies in $additional_libdir and
Chris@1 7756 dnl $LDFLAGS. Using breadth-first-seach.
Chris@1 7757 LIB[]NAME=
Chris@1 7758 LTLIB[]NAME=
Chris@1 7759 INC[]NAME=
Chris@1 7760 rpathdirs=
Chris@1 7761 ltrpathdirs=
Chris@1 7762 names_already_handled=
Chris@1 7763 names_next_round='$1 $2'
Chris@1 7764 while test -n "$names_next_round"; do
Chris@1 7765 names_this_round="$names_next_round"
Chris@1 7766 names_next_round=
Chris@1 7767 for name in $names_this_round; do
Chris@1 7768 already_handled=
Chris@1 7769 for n in $names_already_handled; do
Chris@1 7770 if test "$n" = "$name"; then
Chris@1 7771 already_handled=yes
Chris@1 7772 break
Chris@1 7773 fi
Chris@1 7774 done
Chris@1 7775 if test -z "$already_handled"; then
Chris@1 7776 names_already_handled="$names_already_handled $name"
Chris@1 7777 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
Chris@1 7778 dnl or AC_LIB_HAVE_LINKFLAGS call.
Chris@1 7779 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
Chris@1 7780 eval value=\"\$HAVE_LIB$uppername\"
Chris@1 7781 if test -n "$value"; then
Chris@1 7782 if test "$value" = yes; then
Chris@1 7783 eval value=\"\$LIB$uppername\"
Chris@1 7784 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
Chris@1 7785 eval value=\"\$LTLIB$uppername\"
Chris@1 7786 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
Chris@1 7787 else
Chris@1 7788 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
Chris@1 7789 dnl that this library doesn't exist. So just drop it.
Chris@1 7790 :
Chris@1 7791 fi
Chris@1 7792 else
Chris@1 7793 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
Chris@1 7794 dnl and the already constructed $LIBNAME/$LTLIBNAME.
Chris@1 7795 found_dir=
Chris@1 7796 found_la=
Chris@1 7797 found_so=
Chris@1 7798 found_a=
Chris@1 7799 if test $use_additional = yes; then
Chris@1 7800 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
Chris@1 7801 found_dir="$additional_libdir"
Chris@1 7802 found_so="$additional_libdir/lib$name.$shlibext"
Chris@1 7803 if test -f "$additional_libdir/lib$name.la"; then
Chris@1 7804 found_la="$additional_libdir/lib$name.la"
Chris@1 7805 fi
Chris@1 7806 else
Chris@1 7807 if test -f "$additional_libdir/lib$name.$libext"; then
Chris@1 7808 found_dir="$additional_libdir"
Chris@1 7809 found_a="$additional_libdir/lib$name.$libext"
Chris@1 7810 if test -f "$additional_libdir/lib$name.la"; then
Chris@1 7811 found_la="$additional_libdir/lib$name.la"
Chris@1 7812 fi
Chris@1 7813 fi
Chris@1 7814 fi
Chris@1 7815 fi
Chris@1 7816 if test "X$found_dir" = "X"; then
Chris@1 7817 for x in $LDFLAGS $LTLIB[]NAME; do
Chris@1 7818 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 7819 case "$x" in
Chris@1 7820 -L*)
Chris@1 7821 dir=`echo "X$x" | sed -e 's/^X-L//'`
Chris@1 7822 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
Chris@1 7823 found_dir="$dir"
Chris@1 7824 found_so="$dir/lib$name.$shlibext"
Chris@1 7825 if test -f "$dir/lib$name.la"; then
Chris@1 7826 found_la="$dir/lib$name.la"
Chris@1 7827 fi
Chris@1 7828 else
Chris@1 7829 if test -f "$dir/lib$name.$libext"; then
Chris@1 7830 found_dir="$dir"
Chris@1 7831 found_a="$dir/lib$name.$libext"
Chris@1 7832 if test -f "$dir/lib$name.la"; then
Chris@1 7833 found_la="$dir/lib$name.la"
Chris@1 7834 fi
Chris@1 7835 fi
Chris@1 7836 fi
Chris@1 7837 ;;
Chris@1 7838 esac
Chris@1 7839 if test "X$found_dir" != "X"; then
Chris@1 7840 break
Chris@1 7841 fi
Chris@1 7842 done
Chris@1 7843 fi
Chris@1 7844 if test "X$found_dir" != "X"; then
Chris@1 7845 dnl Found the library.
Chris@1 7846 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
Chris@1 7847 if test "X$found_so" != "X"; then
Chris@1 7848 dnl Linking with a shared library. We attempt to hardcode its
Chris@1 7849 dnl directory into the executable's runpath, unless it's the
Chris@1 7850 dnl standard /usr/lib.
Chris@1 7851 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
Chris@1 7852 dnl No hardcoding is needed.
Chris@1 7853 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Chris@1 7854 else
Chris@1 7855 dnl Use an explicit option to hardcode DIR into the resulting
Chris@1 7856 dnl binary.
Chris@1 7857 dnl Potentially add DIR to ltrpathdirs.
Chris@1 7858 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
Chris@1 7859 haveit=
Chris@1 7860 for x in $ltrpathdirs; do
Chris@1 7861 if test "X$x" = "X$found_dir"; then
Chris@1 7862 haveit=yes
Chris@1 7863 break
Chris@1 7864 fi
Chris@1 7865 done
Chris@1 7866 if test -z "$haveit"; then
Chris@1 7867 ltrpathdirs="$ltrpathdirs $found_dir"
Chris@1 7868 fi
Chris@1 7869 dnl The hardcoding into $LIBNAME is system dependent.
Chris@1 7870 if test "$hardcode_direct" = yes; then
Chris@1 7871 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
Chris@1 7872 dnl resulting binary.
Chris@1 7873 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Chris@1 7874 else
Chris@1 7875 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
Chris@1 7876 dnl Use an explicit option to hardcode DIR into the resulting
Chris@1 7877 dnl binary.
Chris@1 7878 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Chris@1 7879 dnl Potentially add DIR to rpathdirs.
Chris@1 7880 dnl The rpathdirs will be appended to $LIBNAME at the end.
Chris@1 7881 haveit=
Chris@1 7882 for x in $rpathdirs; do
Chris@1 7883 if test "X$x" = "X$found_dir"; then
Chris@1 7884 haveit=yes
Chris@1 7885 break
Chris@1 7886 fi
Chris@1 7887 done
Chris@1 7888 if test -z "$haveit"; then
Chris@1 7889 rpathdirs="$rpathdirs $found_dir"
Chris@1 7890 fi
Chris@1 7891 else
Chris@1 7892 dnl Rely on "-L$found_dir".
Chris@1 7893 dnl But don't add it if it's already contained in the LDFLAGS
Chris@1 7894 dnl or the already constructed $LIBNAME
Chris@1 7895 haveit=
Chris@1 7896 for x in $LDFLAGS $LIB[]NAME; do
Chris@1 7897 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 7898 if test "X$x" = "X-L$found_dir"; then
Chris@1 7899 haveit=yes
Chris@1 7900 break
Chris@1 7901 fi
Chris@1 7902 done
Chris@1 7903 if test -z "$haveit"; then
Chris@1 7904 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
Chris@1 7905 fi
Chris@1 7906 if test "$hardcode_minus_L" != no; then
Chris@1 7907 dnl FIXME: Not sure whether we should use
Chris@1 7908 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
Chris@1 7909 dnl here.
Chris@1 7910 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Chris@1 7911 else
Chris@1 7912 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
Chris@1 7913 dnl here, because this doesn't fit in flags passed to the
Chris@1 7914 dnl compiler. So give up. No hardcoding. This affects only
Chris@1 7915 dnl very old systems.
Chris@1 7916 dnl FIXME: Not sure whether we should use
Chris@1 7917 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
Chris@1 7918 dnl here.
Chris@1 7919 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
Chris@1 7920 fi
Chris@1 7921 fi
Chris@1 7922 fi
Chris@1 7923 fi
Chris@1 7924 else
Chris@1 7925 if test "X$found_a" != "X"; then
Chris@1 7926 dnl Linking with a static library.
Chris@1 7927 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
Chris@1 7928 else
Chris@1 7929 dnl We shouldn't come here, but anyway it's good to have a
Chris@1 7930 dnl fallback.
Chris@1 7931 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
Chris@1 7932 fi
Chris@1 7933 fi
Chris@1 7934 dnl Assume the include files are nearby.
Chris@1 7935 additional_includedir=
Chris@1 7936 case "$found_dir" in
Chris@1 7937 */lib | */lib/)
Chris@1 7938 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
Chris@1 7939 additional_includedir="$basedir/include"
Chris@1 7940 ;;
Chris@1 7941 esac
Chris@1 7942 if test "X$additional_includedir" != "X"; then
Chris@1 7943 dnl Potentially add $additional_includedir to $INCNAME.
Chris@1 7944 dnl But don't add it
Chris@1 7945 dnl 1. if it's the standard /usr/include,
Chris@1 7946 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
Chris@1 7947 dnl 3. if it's already present in $CPPFLAGS or the already
Chris@1 7948 dnl constructed $INCNAME,
Chris@1 7949 dnl 4. if it doesn't exist as a directory.
Chris@1 7950 if test "X$additional_includedir" != "X/usr/include"; then
Chris@1 7951 haveit=
Chris@1 7952 if test "X$additional_includedir" = "X/usr/local/include"; then
Chris@1 7953 if test -n "$GCC"; then
Chris@1 7954 case $host_os in
Chris@1 7955 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Chris@1 7956 esac
Chris@1 7957 fi
Chris@1 7958 fi
Chris@1 7959 if test -z "$haveit"; then
Chris@1 7960 for x in $CPPFLAGS $INC[]NAME; do
Chris@1 7961 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 7962 if test "X$x" = "X-I$additional_includedir"; then
Chris@1 7963 haveit=yes
Chris@1 7964 break
Chris@1 7965 fi
Chris@1 7966 done
Chris@1 7967 if test -z "$haveit"; then
Chris@1 7968 if test -d "$additional_includedir"; then
Chris@1 7969 dnl Really add $additional_includedir to $INCNAME.
Chris@1 7970 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
Chris@1 7971 fi
Chris@1 7972 fi
Chris@1 7973 fi
Chris@1 7974 fi
Chris@1 7975 fi
Chris@1 7976 dnl Look for dependencies.
Chris@1 7977 if test -n "$found_la"; then
Chris@1 7978 dnl Read the .la file. It defines the variables
Chris@1 7979 dnl dlname, library_names, old_library, dependency_libs, current,
Chris@1 7980 dnl age, revision, installed, dlopen, dlpreopen, libdir.
Chris@1 7981 save_libdir="$libdir"
Chris@1 7982 case "$found_la" in
Chris@1 7983 */* | *\\*) . "$found_la" ;;
Chris@1 7984 *) . "./$found_la" ;;
Chris@1 7985 esac
Chris@1 7986 libdir="$save_libdir"
Chris@1 7987 dnl We use only dependency_libs.
Chris@1 7988 for dep in $dependency_libs; do
Chris@1 7989 case "$dep" in
Chris@1 7990 -L*)
Chris@1 7991 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
Chris@1 7992 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
Chris@1 7993 dnl But don't add it
Chris@1 7994 dnl 1. if it's the standard /usr/lib,
Chris@1 7995 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
Chris@1 7996 dnl 3. if it's already present in $LDFLAGS or the already
Chris@1 7997 dnl constructed $LIBNAME,
Chris@1 7998 dnl 4. if it doesn't exist as a directory.
Chris@1 7999 if test "X$additional_libdir" != "X/usr/lib"; then
Chris@1 8000 haveit=
Chris@1 8001 if test "X$additional_libdir" = "X/usr/local/lib"; then
Chris@1 8002 if test -n "$GCC"; then
Chris@1 8003 case $host_os in
Chris@1 8004 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Chris@1 8005 esac
Chris@1 8006 fi
Chris@1 8007 fi
Chris@1 8008 if test -z "$haveit"; then
Chris@1 8009 haveit=
Chris@1 8010 for x in $LDFLAGS $LIB[]NAME; do
Chris@1 8011 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 8012 if test "X$x" = "X-L$additional_libdir"; then
Chris@1 8013 haveit=yes
Chris@1 8014 break
Chris@1 8015 fi
Chris@1 8016 done
Chris@1 8017 if test -z "$haveit"; then
Chris@1 8018 if test -d "$additional_libdir"; then
Chris@1 8019 dnl Really add $additional_libdir to $LIBNAME.
Chris@1 8020 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
Chris@1 8021 fi
Chris@1 8022 fi
Chris@1 8023 haveit=
Chris@1 8024 for x in $LDFLAGS $LTLIB[]NAME; do
Chris@1 8025 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 8026 if test "X$x" = "X-L$additional_libdir"; then
Chris@1 8027 haveit=yes
Chris@1 8028 break
Chris@1 8029 fi
Chris@1 8030 done
Chris@1 8031 if test -z "$haveit"; then
Chris@1 8032 if test -d "$additional_libdir"; then
Chris@1 8033 dnl Really add $additional_libdir to $LTLIBNAME.
Chris@1 8034 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
Chris@1 8035 fi
Chris@1 8036 fi
Chris@1 8037 fi
Chris@1 8038 fi
Chris@1 8039 ;;
Chris@1 8040 -R*)
Chris@1 8041 dir=`echo "X$dep" | sed -e 's/^X-R//'`
Chris@1 8042 if test "$enable_rpath" != no; then
Chris@1 8043 dnl Potentially add DIR to rpathdirs.
Chris@1 8044 dnl The rpathdirs will be appended to $LIBNAME at the end.
Chris@1 8045 haveit=
Chris@1 8046 for x in $rpathdirs; do
Chris@1 8047 if test "X$x" = "X$dir"; then
Chris@1 8048 haveit=yes
Chris@1 8049 break
Chris@1 8050 fi
Chris@1 8051 done
Chris@1 8052 if test -z "$haveit"; then
Chris@1 8053 rpathdirs="$rpathdirs $dir"
Chris@1 8054 fi
Chris@1 8055 dnl Potentially add DIR to ltrpathdirs.
Chris@1 8056 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
Chris@1 8057 haveit=
Chris@1 8058 for x in $ltrpathdirs; do
Chris@1 8059 if test "X$x" = "X$dir"; then
Chris@1 8060 haveit=yes
Chris@1 8061 break
Chris@1 8062 fi
Chris@1 8063 done
Chris@1 8064 if test -z "$haveit"; then
Chris@1 8065 ltrpathdirs="$ltrpathdirs $dir"
Chris@1 8066 fi
Chris@1 8067 fi
Chris@1 8068 ;;
Chris@1 8069 -l*)
Chris@1 8070 dnl Handle this in the next round.
Chris@1 8071 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
Chris@1 8072 ;;
Chris@1 8073 *.la)
Chris@1 8074 dnl Handle this in the next round. Throw away the .la's
Chris@1 8075 dnl directory; it is already contained in a preceding -L
Chris@1 8076 dnl option.
Chris@1 8077 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
Chris@1 8078 ;;
Chris@1 8079 *)
Chris@1 8080 dnl Most likely an immediate library name.
Chris@1 8081 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
Chris@1 8082 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
Chris@1 8083 ;;
Chris@1 8084 esac
Chris@1 8085 done
Chris@1 8086 fi
Chris@1 8087 else
Chris@1 8088 dnl Didn't find the library; assume it is in the system directories
Chris@1 8089 dnl known to the linker and runtime loader. (All the system
Chris@1 8090 dnl directories known to the linker should also be known to the
Chris@1 8091 dnl runtime loader, otherwise the system is severely misconfigured.)
Chris@1 8092 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
Chris@1 8093 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
Chris@1 8094 fi
Chris@1 8095 fi
Chris@1 8096 fi
Chris@1 8097 done
Chris@1 8098 done
Chris@1 8099 if test "X$rpathdirs" != "X"; then
Chris@1 8100 if test -n "$hardcode_libdir_separator"; then
Chris@1 8101 dnl Weird platform: only the last -rpath option counts, the user must
Chris@1 8102 dnl pass all path elements in one option. We can arrange that for a
Chris@1 8103 dnl single library, but not when more than one $LIBNAMEs are used.
Chris@1 8104 alldirs=
Chris@1 8105 for found_dir in $rpathdirs; do
Chris@1 8106 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
Chris@1 8107 done
Chris@1 8108 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
Chris@1 8109 acl_save_libdir="$libdir"
Chris@1 8110 libdir="$alldirs"
Chris@1 8111 eval flag=\"$hardcode_libdir_flag_spec\"
Chris@1 8112 libdir="$acl_save_libdir"
Chris@1 8113 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
Chris@1 8114 else
Chris@1 8115 dnl The -rpath options are cumulative.
Chris@1 8116 for found_dir in $rpathdirs; do
Chris@1 8117 acl_save_libdir="$libdir"
Chris@1 8118 libdir="$found_dir"
Chris@1 8119 eval flag=\"$hardcode_libdir_flag_spec\"
Chris@1 8120 libdir="$acl_save_libdir"
Chris@1 8121 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
Chris@1 8122 done
Chris@1 8123 fi
Chris@1 8124 fi
Chris@1 8125 if test "X$ltrpathdirs" != "X"; then
Chris@1 8126 dnl When using libtool, the option that works for both libraries and
Chris@1 8127 dnl executables is -R. The -R options are cumulative.
Chris@1 8128 for found_dir in $ltrpathdirs; do
Chris@1 8129 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
Chris@1 8130 done
Chris@1 8131 fi
Chris@1 8132 ])
Chris@1 8133
Chris@1 8134 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
Chris@1 8135 dnl unless already present in VAR.
Chris@1 8136 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
Chris@1 8137 dnl contains two or three consecutive elements that belong together.
Chris@1 8138 AC_DEFUN([AC_LIB_APPENDTOVAR],
Chris@1 8139 [
Chris@1 8140 for element in [$2]; do
Chris@1 8141 haveit=
Chris@1 8142 for x in $[$1]; do
Chris@1 8143 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Chris@1 8144 if test "X$x" = "X$element"; then
Chris@1 8145 haveit=yes
Chris@1 8146 break
Chris@1 8147 fi
Chris@1 8148 done
Chris@1 8149 if test -z "$haveit"; then
Chris@1 8150 [$1]="${[$1]}${[$1]:+ }$element"
Chris@1 8151 fi
Chris@1 8152 done
Chris@1 8153 ])
Chris@1 8154
Chris@1 8155 # lib-ld.m4 serial 3 (gettext-0.13)
Chris@1 8156 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
Chris@1 8157 dnl This file is free software; the Free Software Foundation
Chris@1 8158 dnl gives unlimited permission to copy and/or distribute it,
Chris@1 8159 dnl with or without modifications, as long as this notice is preserved.
Chris@1 8160
Chris@1 8161 dnl Subroutines of libtool.m4,
Chris@1 8162 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
Chris@1 8163 dnl with libtool.m4.
Chris@1 8164
Chris@1 8165 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
Chris@1 8166 AC_DEFUN([AC_LIB_PROG_LD_GNU],
Chris@1 8167 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
Chris@1 8168 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
Chris@1 8169 case `$LD -v 2>&1 </dev/null` in
Chris@1 8170 *GNU* | *'with BFD'*)
Chris@1 8171 acl_cv_prog_gnu_ld=yes ;;
Chris@1 8172 *)
Chris@1 8173 acl_cv_prog_gnu_ld=no ;;
Chris@1 8174 esac])
Chris@1 8175 with_gnu_ld=$acl_cv_prog_gnu_ld
Chris@1 8176 ])
Chris@1 8177
Chris@1 8178 dnl From libtool-1.4. Sets the variable LD.
Chris@1 8179 AC_DEFUN([AC_LIB_PROG_LD],
Chris@1 8180 [AC_ARG_WITH(gnu-ld,
Chris@1 8181 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
Chris@1 8182 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
Chris@1 8183 AC_REQUIRE([AC_PROG_CC])dnl
Chris@1 8184 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@1 8185 # Prepare PATH_SEPARATOR.
Chris@1 8186 # The user is always right.
Chris@1 8187 if test "${PATH_SEPARATOR+set}" != set; then
Chris@1 8188 echo "#! /bin/sh" >conf$$.sh
Chris@1 8189 echo "exit 0" >>conf$$.sh
Chris@1 8190 chmod +x conf$$.sh
Chris@1 8191 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Chris@1 8192 PATH_SEPARATOR=';'
Chris@1 8193 else
Chris@1 8194 PATH_SEPARATOR=:
Chris@1 8195 fi
Chris@1 8196 rm -f conf$$.sh
Chris@1 8197 fi
Chris@1 8198 ac_prog=ld
Chris@1 8199 if test "$GCC" = yes; then
Chris@1 8200 # Check if gcc -print-prog-name=ld gives a path.
Chris@1 8201 AC_MSG_CHECKING([for ld used by GCC])
Chris@1 8202 case $host in
Chris@1 8203 *-*-mingw*)
Chris@1 8204 # gcc leaves a trailing carriage return which upsets mingw
Chris@1 8205 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@1 8206 *)
Chris@1 8207 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@1 8208 esac
Chris@1 8209 case $ac_prog in
Chris@1 8210 # Accept absolute paths.
Chris@1 8211 [[\\/]* | [A-Za-z]:[\\/]*)]
Chris@1 8212 [re_direlt='/[^/][^/]*/\.\./']
Chris@1 8213 # Canonicalize the path of ld
Chris@1 8214 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
Chris@1 8215 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
Chris@1 8216 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
Chris@1 8217 done
Chris@1 8218 test -z "$LD" && LD="$ac_prog"
Chris@1 8219 ;;
Chris@1 8220 "")
Chris@1 8221 # If it fails, then pretend we aren't using GCC.
Chris@1 8222 ac_prog=ld
Chris@1 8223 ;;
Chris@1 8224 *)
Chris@1 8225 # If it is relative, then search for the first ld in PATH.
Chris@1 8226 with_gnu_ld=unknown
Chris@1 8227 ;;
Chris@1 8228 esac
Chris@1 8229 elif test "$with_gnu_ld" = yes; then
Chris@1 8230 AC_MSG_CHECKING([for GNU ld])
Chris@1 8231 else
Chris@1 8232 AC_MSG_CHECKING([for non-GNU ld])
Chris@1 8233 fi
Chris@1 8234 AC_CACHE_VAL(acl_cv_path_LD,
Chris@1 8235 [if test -z "$LD"; then
Chris@1 8236 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
Chris@1 8237 for ac_dir in $PATH; do
Chris@1 8238 test -z "$ac_dir" && ac_dir=.
Chris@1 8239 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@1 8240 acl_cv_path_LD="$ac_dir/$ac_prog"
Chris@1 8241 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@1 8242 # but apparently some GNU ld's only accept -v.
Chris@1 8243 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@1 8244 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
Chris@1 8245 *GNU* | *'with BFD'*)
Chris@1 8246 test "$with_gnu_ld" != no && break ;;
Chris@1 8247 *)
Chris@1 8248 test "$with_gnu_ld" != yes && break ;;
Chris@1 8249 esac
Chris@1 8250 fi
Chris@1 8251 done
Chris@1 8252 IFS="$ac_save_ifs"
Chris@1 8253 else
Chris@1 8254 acl_cv_path_LD="$LD" # Let the user override the test with a path.
Chris@1 8255 fi])
Chris@1 8256 LD="$acl_cv_path_LD"
Chris@1 8257 if test -n "$LD"; then
Chris@1 8258 AC_MSG_RESULT($LD)
Chris@1 8259 else
Chris@1 8260 AC_MSG_RESULT(no)
Chris@1 8261 fi
Chris@1 8262 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@1 8263 AC_LIB_PROG_LD_GNU
Chris@1 8264 ])
Chris@1 8265
Chris@1 8266 # codeset.m4 serial AM1 (gettext-0.10.40)
Chris@1 8267 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
Chris@1 8268 dnl This file is free software; the Free Software Foundation
Chris@1 8269 dnl gives unlimited permission to copy and/or distribute it,
Chris@1 8270 dnl with or without modifications, as long as this notice is preserved.
Chris@1 8271
Chris@1 8272 dnl From Bruno Haible.
Chris@1 8273
Chris@1 8274 AC_DEFUN([AM_LANGINFO_CODESET],
Chris@1 8275 [
Chris@1 8276 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
Chris@1 8277 [AC_TRY_LINK([#include <langinfo.h>],
Chris@1 8278 [char* cs = nl_langinfo(CODESET);],
Chris@1 8279 am_cv_langinfo_codeset=yes,
Chris@1 8280 am_cv_langinfo_codeset=no)
Chris@1 8281 ])
Chris@1 8282 if test $am_cv_langinfo_codeset = yes; then
Chris@1 8283 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
Chris@1 8284 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
Chris@1 8285 fi
Chris@1 8286 ])
Chris@1 8287