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