annotate aclocal.m4 @ 0:d39e1d0d75b6

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