| 1 | dnl ./aclocal.m4 generated automatically by aclocal 1.4-p5 |
| 2 | |
| 3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | |
| 8 | dnl This program is distributed in the hope that it will be useful, |
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 11 | dnl PARTICULAR PURPOSE. |
| 12 | |
| 13 | # lib-prefix.m4 serial 5 (gettext-0.15) |
| 14 | dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. |
| 15 | dnl This file is free software; the Free Software Foundation |
| 16 | dnl gives unlimited permission to copy and/or distribute it, |
| 17 | dnl with or without modifications, as long as this notice is preserved. |
| 18 | |
| 19 | dnl From Bruno Haible. |
| 20 | |
| 21 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
| 22 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
| 23 | dnl require excessive bracketing. |
| 24 | ifdef([AC_HELP_STRING], |
| 25 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
| 26 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
| 27 | |
| 28 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
| 29 | dnl to access previously installed libraries. The basic assumption is that |
| 30 | dnl a user will want packages to use other packages he previously installed |
| 31 | dnl with the same --prefix option. |
| 32 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
| 33 | dnl libraries, but is otherwise very convenient. |
| 34 | AC_DEFUN([AC_LIB_PREFIX], |
| 35 | [ |
| 36 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
| 37 | AC_REQUIRE([AC_PROG_CC]) |
| 38 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| 39 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
| 40 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 41 | dnl By default, look in $includedir and $libdir. |
| 42 | use_additional=yes |
| 43 | AC_LIB_WITH_FINAL_PREFIX([ |
| 44 | eval additional_includedir=\"$includedir\" |
| 45 | eval additional_libdir=\"$libdir\" |
| 46 | ]) |
| 47 | AC_LIB_ARG_WITH([lib-prefix], |
| 48 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
| 49 | --without-lib-prefix don't search for libraries in includedir and libdir], |
| 50 | [ |
| 51 | if test "X$withval" = "Xno"; then |
| 52 | use_additional=no |
| 53 | else |
| 54 | if test "X$withval" = "X"; then |
| 55 | AC_LIB_WITH_FINAL_PREFIX([ |
| 56 | eval additional_includedir=\"$includedir\" |
| 57 | eval additional_libdir=\"$libdir\" |
| 58 | ]) |
| 59 | else |
| 60 | additional_includedir="$withval/include" |
| 61 | additional_libdir="$withval/$acl_libdirstem" |
| 62 | fi |
| 63 | fi |
| 64 | ]) |
| 65 | if test $use_additional = yes; then |
| 66 | dnl Potentially add $additional_includedir to $CPPFLAGS. |
| 67 | dnl But don't add it |
| 68 | dnl 1. if it's the standard /usr/include, |
| 69 | dnl 2. if it's already present in $CPPFLAGS, |
| 70 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
| 71 | dnl 4. if it doesn't exist as a directory. |
| 72 | if test "X$additional_includedir" != "X/usr/include"; then |
| 73 | haveit= |
| 74 | for x in $CPPFLAGS; do |
| 75 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 76 | if test "X$x" = "X-I$additional_includedir"; then |
| 77 | haveit=yes |
| 78 | break |
| 79 | fi |
| 80 | done |
| 81 | if test -z "$haveit"; then |
| 82 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 83 | if test -n "$GCC"; then |
| 84 | case $host_os in |
| 85 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
| 86 | esac |
| 87 | fi |
| 88 | fi |
| 89 | if test -z "$haveit"; then |
| 90 | if test -d "$additional_includedir"; then |
| 91 | dnl Really add $additional_includedir to $CPPFLAGS. |
| 92 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
| 93 | fi |
| 94 | fi |
| 95 | fi |
| 96 | fi |
| 97 | dnl Potentially add $additional_libdir to $LDFLAGS. |
| 98 | dnl But don't add it |
| 99 | dnl 1. if it's the standard /usr/lib, |
| 100 | dnl 2. if it's already present in $LDFLAGS, |
| 101 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
| 102 | dnl 4. if it doesn't exist as a directory. |
| 103 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
| 104 | haveit= |
| 105 | for x in $LDFLAGS; do |
| 106 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 107 | if test "X$x" = "X-L$additional_libdir"; then |
| 108 | haveit=yes |
| 109 | break |
| 110 | fi |
| 111 | done |
| 112 | if test -z "$haveit"; then |
| 113 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
| 114 | if test -n "$GCC"; then |
| 115 | case $host_os in |
| 116 | linux*) haveit=yes;; |
| 117 | esac |
| 118 | fi |
| 119 | fi |
| 120 | if test -z "$haveit"; then |
| 121 | if test -d "$additional_libdir"; then |
| 122 | dnl Really add $additional_libdir to $LDFLAGS. |
| 123 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
| 124 | fi |
| 125 | fi |
| 126 | fi |
| 127 | fi |
| 128 | fi |
| 129 | ]) |
| 130 | |
| 131 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
| 132 | dnl acl_final_exec_prefix, containing the values to which $prefix and |
| 133 | dnl $exec_prefix will expand at the end of the configure script. |
| 134 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
| 135 | [ |
| 136 | dnl Unfortunately, prefix and exec_prefix get only finally determined |
| 137 | dnl at the end of configure. |
| 138 | if test "X$prefix" = "XNONE"; then |
| 139 | acl_final_prefix="$ac_default_prefix" |
| 140 | else |
| 141 | acl_final_prefix="$prefix" |
| 142 | fi |
| 143 | if test "X$exec_prefix" = "XNONE"; then |
| 144 | acl_final_exec_prefix='${prefix}' |
| 145 | else |
| 146 | acl_final_exec_prefix="$exec_prefix" |
| 147 | fi |
| 148 | acl_save_prefix="$prefix" |
| 149 | prefix="$acl_final_prefix" |
| 150 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
| 151 | prefix="$acl_save_prefix" |
| 152 | ]) |
| 153 | |
| 154 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
| 155 | dnl variables prefix and exec_prefix bound to the values they will have |
| 156 | dnl at the end of the configure script. |
| 157 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
| 158 | [ |
| 159 | acl_save_prefix="$prefix" |
| 160 | prefix="$acl_final_prefix" |
| 161 | acl_save_exec_prefix="$exec_prefix" |
| 162 | exec_prefix="$acl_final_exec_prefix" |
| 163 | $1 |
| 164 | exec_prefix="$acl_save_exec_prefix" |
| 165 | prefix="$acl_save_prefix" |
| 166 | ]) |
| 167 | |
| 168 | dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing |
| 169 | dnl the basename of the libdir, either "lib" or "lib64". |
| 170 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
| 171 | [ |
| 172 | dnl There is no formal standard regarding lib and lib64. The current |
| 173 | dnl practice is that on a system supporting 32-bit and 64-bit instruction |
| 174 | dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit |
| 175 | dnl libraries go under $prefix/lib. We determine the compiler's default |
| 176 | dnl mode by looking at the compiler's library search path. If at least |
| 177 | dnl of its elements ends in /lib64 or points to a directory whose absolute |
| 178 | dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the |
| 179 | dnl default, namely "lib". |
| 180 | acl_libdirstem=lib |
| 181 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
| 182 | if test -n "$searchpath"; then |
| 183 | acl_save_IFS="${IFS= }"; IFS=":" |
| 184 | for searchdir in $searchpath; do |
| 185 | if test -d "$searchdir"; then |
| 186 | case "$searchdir" in |
| 187 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
| 188 | *) searchdir=`cd "$searchdir" && pwd` |
| 189 | case "$searchdir" in |
| 190 | */lib64 ) acl_libdirstem=lib64 ;; |
| 191 | esac ;; |
| 192 | esac |
| 193 | fi |
| 194 | done |
| 195 | IFS="$acl_save_IFS" |
| 196 | fi |
| 197 | ]) |
| 198 | |
| 199 | # lib-link.m4 serial 8 (gettext-0.15) |
| 200 | dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. |
| 201 | dnl This file is free software; the Free Software Foundation |
| 202 | dnl gives unlimited permission to copy and/or distribute it, |
| 203 | dnl with or without modifications, as long as this notice is preserved. |
| 204 | |
| 205 | dnl From Bruno Haible. |
| 206 | |
| 207 | AC_PREREQ(2.50) |
| 208 | |
| 209 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
| 210 | dnl the libraries corresponding to explicit and implicit dependencies. |
| 211 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
| 212 | dnl augments the CPPFLAGS variable. |
| 213 | AC_DEFUN([AC_LIB_LINKFLAGS], |
| 214 | [ |
| 215 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 216 | AC_REQUIRE([AC_LIB_RPATH]) |
| 217 | define([Name],[translit([$1],[./-], [___])]) |
| 218 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 219 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 220 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
| 221 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
| 222 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
| 223 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
| 224 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
| 225 | ]) |
| 226 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
| 227 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
| 228 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
| 229 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
| 230 | AC_SUBST([LIB]NAME) |
| 231 | AC_SUBST([LTLIB]NAME) |
| 232 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
| 233 | dnl results of this search when this library appears as a dependency. |
| 234 | HAVE_LIB[]NAME=yes |
| 235 | undefine([Name]) |
| 236 | undefine([NAME]) |
| 237 | ]) |
| 238 | |
| 239 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
| 240 | dnl searches for libname and the libraries corresponding to explicit and |
| 241 | dnl implicit dependencies, together with the specified include files and |
| 242 | dnl the ability to compile and link the specified testcode. If found, it |
| 243 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
| 244 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
| 245 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
| 246 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
| 247 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
| 248 | [ |
| 249 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| 250 | AC_REQUIRE([AC_LIB_RPATH]) |
| 251 | define([Name],[translit([$1],[./-], [___])]) |
| 252 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 253 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 254 | |
| 255 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
| 256 | dnl accordingly. |
| 257 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
| 258 | |
| 259 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
| 260 | dnl because if the user has installed lib[]Name and not disabled its use |
| 261 | dnl via --without-lib[]Name-prefix, he wants to use it. |
| 262 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 263 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
| 264 | |
| 265 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
| 266 | ac_save_LIBS="$LIBS" |
| 267 | LIBS="$LIBS $LIB[]NAME" |
| 268 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
| 269 | LIBS="$ac_save_LIBS" |
| 270 | ]) |
| 271 | if test "$ac_cv_lib[]Name" = yes; then |
| 272 | HAVE_LIB[]NAME=yes |
| 273 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
| 274 | AC_MSG_CHECKING([how to link with lib[]$1]) |
| 275 | AC_MSG_RESULT([$LIB[]NAME]) |
| 276 | else |
| 277 | HAVE_LIB[]NAME=no |
| 278 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
| 279 | dnl $INC[]NAME either. |
| 280 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 281 | LIB[]NAME= |
| 282 | LTLIB[]NAME= |
| 283 | fi |
| 284 | AC_SUBST([HAVE_LIB]NAME) |
| 285 | AC_SUBST([LIB]NAME) |
| 286 | AC_SUBST([LTLIB]NAME) |
| 287 | undefine([Name]) |
| 288 | undefine([NAME]) |
| 289 | ]) |
| 290 | |
| 291 | dnl Determine the platform dependent parameters needed to use rpath: |
| 292 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
| 293 | dnl hardcode_direct, hardcode_minus_L. |
| 294 | AC_DEFUN([AC_LIB_RPATH], |
| 295 | [ |
| 296 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. |
| 297 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) |
| 298 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
| 299 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
| 300 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
| 301 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
| 302 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
| 303 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
| 304 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
| 305 | . ./conftest.sh |
| 306 | rm -f ./conftest.sh |
| 307 | acl_cv_rpath=done |
| 308 | ]) |
| 309 | wl="$acl_cv_wl" |
| 310 | libext="$acl_cv_libext" |
| 311 | shlibext="$acl_cv_shlibext" |
| 312 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
| 313 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
| 314 | hardcode_direct="$acl_cv_hardcode_direct" |
| 315 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
| 316 | dnl Determine whether the user wants rpath handling at all. |
| 317 | AC_ARG_ENABLE(rpath, |
| 318 | [ --disable-rpath do not hardcode runtime library paths], |
| 319 | :, enable_rpath=yes) |
| 320 | ]) |
| 321 | |
| 322 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
| 323 | dnl the libraries corresponding to explicit and implicit dependencies. |
| 324 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
| 325 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
| 326 | [ |
| 327 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
| 328 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
| 329 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
| 330 | dnl By default, look in $includedir and $libdir. |
| 331 | use_additional=yes |
| 332 | AC_LIB_WITH_FINAL_PREFIX([ |
| 333 | eval additional_includedir=\"$includedir\" |
| 334 | eval additional_libdir=\"$libdir\" |
| 335 | ]) |
| 336 | AC_LIB_ARG_WITH([lib$1-prefix], |
| 337 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
| 338 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
| 339 | [ |
| 340 | if test "X$withval" = "Xno"; then |
| 341 | use_additional=no |
| 342 | else |
| 343 | if test "X$withval" = "X"; then |
| 344 | AC_LIB_WITH_FINAL_PREFIX([ |
| 345 | eval additional_includedir=\"$includedir\" |
| 346 | eval additional_libdir=\"$libdir\" |
| 347 | ]) |
| 348 | else |
| 349 | additional_includedir="$withval/include" |
| 350 | additional_libdir="$withval/$acl_libdirstem" |
| 351 | fi |
| 352 | fi |
| 353 | ]) |
| 354 | dnl Search the library and its dependencies in $additional_libdir and |
| 355 | dnl $LDFLAGS. Using breadth-first-seach. |
| 356 | LIB[]NAME= |
| 357 | LTLIB[]NAME= |
| 358 | INC[]NAME= |
| 359 | rpathdirs= |
| 360 | ltrpathdirs= |
| 361 | names_already_handled= |
| 362 | names_next_round='$1 $2' |
| 363 | while test -n "$names_next_round"; do |
| 364 | names_this_round="$names_next_round" |
| 365 | names_next_round= |
| 366 | for name in $names_this_round; do |
| 367 | already_handled= |
| 368 | for n in $names_already_handled; do |
| 369 | if test "$n" = "$name"; then |
| 370 | already_handled=yes |
| 371 | break |
| 372 | fi |
| 373 | done |
| 374 | if test -z "$already_handled"; then |
| 375 | names_already_handled="$names_already_handled $name" |
| 376 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
| 377 | dnl or AC_LIB_HAVE_LINKFLAGS call. |
| 378 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 379 | eval value=\"\$HAVE_LIB$uppername\" |
| 380 | if test -n "$value"; then |
| 381 | if test "$value" = yes; then |
| 382 | eval value=\"\$LIB$uppername\" |
| 383 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
| 384 | eval value=\"\$LTLIB$uppername\" |
| 385 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
| 386 | else |
| 387 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
| 388 | dnl that this library doesn't exist. So just drop it. |
| 389 | : |
| 390 | fi |
| 391 | else |
| 392 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
| 393 | dnl and the already constructed $LIBNAME/$LTLIBNAME. |
| 394 | found_dir= |
| 395 | found_la= |
| 396 | found_so= |
| 397 | found_a= |
| 398 | if test $use_additional = yes; then |
| 399 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
| 400 | found_dir="$additional_libdir" |
| 401 | found_so="$additional_libdir/lib$name.$shlibext" |
| 402 | if test -f "$additional_libdir/lib$name.la"; then |
| 403 | found_la="$additional_libdir/lib$name.la" |
| 404 | fi |
| 405 | else |
| 406 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 407 | found_dir="$additional_libdir" |
| 408 | found_a="$additional_libdir/lib$name.$libext" |
| 409 | if test -f "$additional_libdir/lib$name.la"; then |
| 410 | found_la="$additional_libdir/lib$name.la" |
| 411 | fi |
| 412 | fi |
| 413 | fi |
| 414 | fi |
| 415 | if test "X$found_dir" = "X"; then |
| 416 | for x in $LDFLAGS $LTLIB[]NAME; do |
| 417 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 418 | case "$x" in |
| 419 | -L*) |
| 420 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 421 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
| 422 | found_dir="$dir" |
| 423 | found_so="$dir/lib$name.$shlibext" |
| 424 | if test -f "$dir/lib$name.la"; then |
| 425 | found_la="$dir/lib$name.la" |
| 426 | fi |
| 427 | else |
| 428 | if test -f "$dir/lib$name.$libext"; then |
| 429 | found_dir="$dir" |
| 430 | found_a="$dir/lib$name.$libext" |
| 431 | if test -f "$dir/lib$name.la"; then |
| 432 | found_la="$dir/lib$name.la" |
| 433 | fi |
| 434 | fi |
| 435 | fi |
| 436 | ;; |
| 437 | esac |
| 438 | if test "X$found_dir" != "X"; then |
| 439 | break |
| 440 | fi |
| 441 | done |
| 442 | fi |
| 443 | if test "X$found_dir" != "X"; then |
| 444 | dnl Found the library. |
| 445 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
| 446 | if test "X$found_so" != "X"; then |
| 447 | dnl Linking with a shared library. We attempt to hardcode its |
| 448 | dnl directory into the executable's runpath, unless it's the |
| 449 | dnl standard /usr/lib. |
| 450 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then |
| 451 | dnl No hardcoding is needed. |
| 452 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 453 | else |
| 454 | dnl Use an explicit option to hardcode DIR into the resulting |
| 455 | dnl binary. |
| 456 | dnl Potentially add DIR to ltrpathdirs. |
| 457 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
| 458 | haveit= |
| 459 | for x in $ltrpathdirs; do |
| 460 | if test "X$x" = "X$found_dir"; then |
| 461 | haveit=yes |
| 462 | break |
| 463 | fi |
| 464 | done |
| 465 | if test -z "$haveit"; then |
| 466 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 467 | fi |
| 468 | dnl The hardcoding into $LIBNAME is system dependent. |
| 469 | if test "$hardcode_direct" = yes; then |
| 470 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
| 471 | dnl resulting binary. |
| 472 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 473 | else |
| 474 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 475 | dnl Use an explicit option to hardcode DIR into the resulting |
| 476 | dnl binary. |
| 477 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 478 | dnl Potentially add DIR to rpathdirs. |
| 479 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
| 480 | haveit= |
| 481 | for x in $rpathdirs; do |
| 482 | if test "X$x" = "X$found_dir"; then |
| 483 | haveit=yes |
| 484 | break |
| 485 | fi |
| 486 | done |
| 487 | if test -z "$haveit"; then |
| 488 | rpathdirs="$rpathdirs $found_dir" |
| 489 | fi |
| 490 | else |
| 491 | dnl Rely on "-L$found_dir". |
| 492 | dnl But don't add it if it's already contained in the LDFLAGS |
| 493 | dnl or the already constructed $LIBNAME |
| 494 | haveit= |
| 495 | for x in $LDFLAGS $LIB[]NAME; do |
| 496 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 497 | if test "X$x" = "X-L$found_dir"; then |
| 498 | haveit=yes |
| 499 | break |
| 500 | fi |
| 501 | done |
| 502 | if test -z "$haveit"; then |
| 503 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
| 504 | fi |
| 505 | if test "$hardcode_minus_L" != no; then |
| 506 | dnl FIXME: Not sure whether we should use |
| 507 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
| 508 | dnl here. |
| 509 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
| 510 | else |
| 511 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
| 512 | dnl here, because this doesn't fit in flags passed to the |
| 513 | dnl compiler. So give up. No hardcoding. This affects only |
| 514 | dnl very old systems. |
| 515 | dnl FIXME: Not sure whether we should use |
| 516 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
| 517 | dnl here. |
| 518 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
| 519 | fi |
| 520 | fi |
| 521 | fi |
| 522 | fi |
| 523 | else |
| 524 | if test "X$found_a" != "X"; then |
| 525 | dnl Linking with a static library. |
| 526 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
| 527 | else |
| 528 | dnl We shouldn't come here, but anyway it's good to have a |
| 529 | dnl fallback. |
| 530 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
| 531 | fi |
| 532 | fi |
| 533 | dnl Assume the include files are nearby. |
| 534 | additional_includedir= |
| 535 | case "$found_dir" in |
| 536 | */$acl_libdirstem | */$acl_libdirstem/) |
| 537 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
| 538 | additional_includedir="$basedir/include" |
| 539 | ;; |
| 540 | esac |
| 541 | if test "X$additional_includedir" != "X"; then |
| 542 | dnl Potentially add $additional_includedir to $INCNAME. |
| 543 | dnl But don't add it |
| 544 | dnl 1. if it's the standard /usr/include, |
| 545 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
| 546 | dnl 3. if it's already present in $CPPFLAGS or the already |
| 547 | dnl constructed $INCNAME, |
| 548 | dnl 4. if it doesn't exist as a directory. |
| 549 | if test "X$additional_includedir" != "X/usr/include"; then |
| 550 | haveit= |
| 551 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 552 | if test -n "$GCC"; then |
| 553 | case $host_os in |
| 554 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
| 555 | esac |
| 556 | fi |
| 557 | fi |
| 558 | if test -z "$haveit"; then |
| 559 | for x in $CPPFLAGS $INC[]NAME; do |
| 560 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 561 | if test "X$x" = "X-I$additional_includedir"; then |
| 562 | haveit=yes |
| 563 | break |
| 564 | fi |
| 565 | done |
| 566 | if test -z "$haveit"; then |
| 567 | if test -d "$additional_includedir"; then |
| 568 | dnl Really add $additional_includedir to $INCNAME. |
| 569 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
| 570 | fi |
| 571 | fi |
| 572 | fi |
| 573 | fi |
| 574 | fi |
| 575 | dnl Look for dependencies. |
| 576 | if test -n "$found_la"; then |
| 577 | dnl Read the .la file. It defines the variables |
| 578 | dnl dlname, library_names, old_library, dependency_libs, current, |
| 579 | dnl age, revision, installed, dlopen, dlpreopen, libdir. |
| 580 | save_libdir="$libdir" |
| 581 | case "$found_la" in |
| 582 | */* | *\\*) . "$found_la" ;; |
| 583 | *) . "./$found_la" ;; |
| 584 | esac |
| 585 | libdir="$save_libdir" |
| 586 | dnl We use only dependency_libs. |
| 587 | for dep in $dependency_libs; do |
| 588 | case "$dep" in |
| 589 | -L*) |
| 590 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 591 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
| 592 | dnl But don't add it |
| 593 | dnl 1. if it's the standard /usr/lib, |
| 594 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
| 595 | dnl 3. if it's already present in $LDFLAGS or the already |
| 596 | dnl constructed $LIBNAME, |
| 597 | dnl 4. if it doesn't exist as a directory. |
| 598 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
| 599 | haveit= |
| 600 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
| 601 | if test -n "$GCC"; then |
| 602 | case $host_os in |
| 603 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
| 604 | esac |
| 605 | fi |
| 606 | fi |
| 607 | if test -z "$haveit"; then |
| 608 | haveit= |
| 609 | for x in $LDFLAGS $LIB[]NAME; do |
| 610 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 611 | if test "X$x" = "X-L$additional_libdir"; then |
| 612 | haveit=yes |
| 613 | break |
| 614 | fi |
| 615 | done |
| 616 | if test -z "$haveit"; then |
| 617 | if test -d "$additional_libdir"; then |
| 618 | dnl Really add $additional_libdir to $LIBNAME. |
| 619 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
| 620 | fi |
| 621 | fi |
| 622 | haveit= |
| 623 | for x in $LDFLAGS $LTLIB[]NAME; do |
| 624 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 625 | if test "X$x" = "X-L$additional_libdir"; then |
| 626 | haveit=yes |
| 627 | break |
| 628 | fi |
| 629 | done |
| 630 | if test -z "$haveit"; then |
| 631 | if test -d "$additional_libdir"; then |
| 632 | dnl Really add $additional_libdir to $LTLIBNAME. |
| 633 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
| 634 | fi |
| 635 | fi |
| 636 | fi |
| 637 | fi |
| 638 | ;; |
| 639 | -R*) |
| 640 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 641 | if test "$enable_rpath" != no; then |
| 642 | dnl Potentially add DIR to rpathdirs. |
| 643 | dnl The rpathdirs will be appended to $LIBNAME at the end. |
| 644 | haveit= |
| 645 | for x in $rpathdirs; do |
| 646 | if test "X$x" = "X$dir"; then |
| 647 | haveit=yes |
| 648 | break |
| 649 | fi |
| 650 | done |
| 651 | if test -z "$haveit"; then |
| 652 | rpathdirs="$rpathdirs $dir" |
| 653 | fi |
| 654 | dnl Potentially add DIR to ltrpathdirs. |
| 655 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
| 656 | haveit= |
| 657 | for x in $ltrpathdirs; do |
| 658 | if test "X$x" = "X$dir"; then |
| 659 | haveit=yes |
| 660 | break |
| 661 | fi |
| 662 | done |
| 663 | if test -z "$haveit"; then |
| 664 | ltrpathdirs="$ltrpathdirs $dir" |
| 665 | fi |
| 666 | fi |
| 667 | ;; |
| 668 | -l*) |
| 669 | dnl Handle this in the next round. |
| 670 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 671 | ;; |
| 672 | *.la) |
| 673 | dnl Handle this in the next round. Throw away the .la's |
| 674 | dnl directory; it is already contained in a preceding -L |
| 675 | dnl option. |
| 676 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 677 | ;; |
| 678 | *) |
| 679 | dnl Most likely an immediate library name. |
| 680 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
| 681 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
| 682 | ;; |
| 683 | esac |
| 684 | done |
| 685 | fi |
| 686 | else |
| 687 | dnl Didn't find the library; assume it is in the system directories |
| 688 | dnl known to the linker and runtime loader. (All the system |
| 689 | dnl directories known to the linker should also be known to the |
| 690 | dnl runtime loader, otherwise the system is severely misconfigured.) |
| 691 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
| 692 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
| 693 | fi |
| 694 | fi |
| 695 | fi |
| 696 | done |
| 697 | done |
| 698 | if test "X$rpathdirs" != "X"; then |
| 699 | if test -n "$hardcode_libdir_separator"; then |
| 700 | dnl Weird platform: only the last -rpath option counts, the user must |
| 701 | dnl pass all path elements in one option. We can arrange that for a |
| 702 | dnl single library, but not when more than one $LIBNAMEs are used. |
| 703 | alldirs= |
| 704 | for found_dir in $rpathdirs; do |
| 705 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 706 | done |
| 707 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
| 708 | acl_save_libdir="$libdir" |
| 709 | libdir="$alldirs" |
| 710 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 711 | libdir="$acl_save_libdir" |
| 712 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
| 713 | else |
| 714 | dnl The -rpath options are cumulative. |
| 715 | for found_dir in $rpathdirs; do |
| 716 | acl_save_libdir="$libdir" |
| 717 | libdir="$found_dir" |
| 718 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 719 | libdir="$acl_save_libdir" |
| 720 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
| 721 | done |
| 722 | fi |
| 723 | fi |
| 724 | if test "X$ltrpathdirs" != "X"; then |
| 725 | dnl When using libtool, the option that works for both libraries and |
| 726 | dnl executables is -R. The -R options are cumulative. |
| 727 | for found_dir in $ltrpathdirs; do |
| 728 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
| 729 | done |
| 730 | fi |
| 731 | ]) |
| 732 | |
| 733 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
| 734 | dnl unless already present in VAR. |
| 735 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
| 736 | dnl contains two or three consecutive elements that belong together. |
| 737 | AC_DEFUN([AC_LIB_APPENDTOVAR], |
| 738 | [ |
| 739 | for element in [$2]; do |
| 740 | haveit= |
| 741 | for x in $[$1]; do |
| 742 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
| 743 | if test "X$x" = "X$element"; then |
| 744 | haveit=yes |
| 745 | break |
| 746 | fi |
| 747 | done |
| 748 | if test -z "$haveit"; then |
| 749 | [$1]="${[$1]}${[$1]:+ }$element" |
| 750 | fi |
| 751 | done |
| 752 | ]) |
| 753 | |
| 754 | dnl For those cases where a variable contains several -L and -l options |
| 755 | dnl referring to unknown libraries and directories, this macro determines the |
| 756 | dnl necessary additional linker options for the runtime path. |
| 757 | dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) |
| 758 | dnl sets LDADDVAR to linker options needed together with LIBSVALUE. |
| 759 | dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, |
| 760 | dnl otherwise linking without libtool is assumed. |
| 761 | AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], |
| 762 | [ |
| 763 | AC_REQUIRE([AC_LIB_RPATH]) |
| 764 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
| 765 | $1= |
| 766 | if test "$enable_rpath" != no; then |
| 767 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 768 | dnl Use an explicit option to hardcode directories into the resulting |
| 769 | dnl binary. |
| 770 | rpathdirs= |
| 771 | next= |
| 772 | for opt in $2; do |
| 773 | if test -n "$next"; then |
| 774 | dir="$next" |
| 775 | dnl No need to hardcode the standard /usr/lib. |
| 776 | if test "X$dir" != "X/usr/$acl_libdirstem"; then |
| 777 | rpathdirs="$rpathdirs $dir" |
| 778 | fi |
| 779 | next= |
| 780 | else |
| 781 | case $opt in |
| 782 | -L) next=yes ;; |
| 783 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
| 784 | dnl No need to hardcode the standard /usr/lib. |
| 785 | if test "X$dir" != "X/usr/$acl_libdirstem"; then |
| 786 | rpathdirs="$rpathdirs $dir" |
| 787 | fi |
| 788 | next= ;; |
| 789 | *) next= ;; |
| 790 | esac |
| 791 | fi |
| 792 | done |
| 793 | if test "X$rpathdirs" != "X"; then |
| 794 | if test -n ""$3""; then |
| 795 | dnl libtool is used for linking. Use -R options. |
| 796 | for dir in $rpathdirs; do |
| 797 | $1="${$1}${$1:+ }-R$dir" |
| 798 | done |
| 799 | else |
| 800 | dnl The linker is used for linking directly. |
| 801 | if test -n "$hardcode_libdir_separator"; then |
| 802 | dnl Weird platform: only the last -rpath option counts, the user |
| 803 | dnl must pass all path elements in one option. |
| 804 | alldirs= |
| 805 | for dir in $rpathdirs; do |
| 806 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" |
| 807 | done |
| 808 | acl_save_libdir="$libdir" |
| 809 | libdir="$alldirs" |
| 810 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 811 | libdir="$acl_save_libdir" |
| 812 | $1="$flag" |
| 813 | else |
| 814 | dnl The -rpath options are cumulative. |
| 815 | for dir in $rpathdirs; do |
| 816 | acl_save_libdir="$libdir" |
| 817 | libdir="$dir" |
| 818 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 819 | libdir="$acl_save_libdir" |
| 820 | $1="${$1}${$1:+ }$flag" |
| 821 | done |
| 822 | fi |
| 823 | fi |
| 824 | fi |
| 825 | fi |
| 826 | fi |
| 827 | AC_SUBST([$1]) |
| 828 | ]) |
| 829 | |
| 830 | # lib-ld.m4 serial 3 (gettext-0.13) |
| 831 | dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
| 832 | dnl This file is free software; the Free Software Foundation |
| 833 | dnl gives unlimited permission to copy and/or distribute it, |
| 834 | dnl with or without modifications, as long as this notice is preserved. |
| 835 | |
| 836 | dnl Subroutines of libtool.m4, |
| 837 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
| 838 | dnl with libtool.m4. |
| 839 | |
| 840 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
| 841 | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
| 842 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
| 843 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 844 | case `$LD -v 2>&1 </dev/null` in |
| 845 | *GNU* | *'with BFD'*) |
| 846 | acl_cv_prog_gnu_ld=yes ;; |
| 847 | *) |
| 848 | acl_cv_prog_gnu_ld=no ;; |
| 849 | esac]) |
| 850 | with_gnu_ld=$acl_cv_prog_gnu_ld |
| 851 | ]) |
| 852 | |
| 853 | dnl From libtool-1.4. Sets the variable LD. |
| 854 | AC_DEFUN([AC_LIB_PROG_LD], |
| 855 | [AC_ARG_WITH(gnu-ld, |
| 856 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
| 857 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
| 858 | AC_REQUIRE([AC_PROG_CC])dnl |
| 859 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 860 | # Prepare PATH_SEPARATOR. |
| 861 | # The user is always right. |
| 862 | if test "${PATH_SEPARATOR+set}" != set; then |
| 863 | echo "#! /bin/sh" >conf$$.sh |
| 864 | echo "exit 0" >>conf$$.sh |
| 865 | chmod +x conf$$.sh |
| 866 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
| 867 | PATH_SEPARATOR=';' |
| 868 | else |
| 869 | PATH_SEPARATOR=: |
| 870 | fi |
| 871 | rm -f conf$$.sh |
| 872 | fi |
| 873 | ac_prog=ld |
| 874 | if test "$GCC" = yes; then |
| 875 | # Check if gcc -print-prog-name=ld gives a path. |
| 876 | AC_MSG_CHECKING([for ld used by GCC]) |
| 877 | case $host in |
| 878 | *-*-mingw*) |
| 879 | # gcc leaves a trailing carriage return which upsets mingw |
| 880 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 881 | *) |
| 882 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 883 | esac |
| 884 | case $ac_prog in |
| 885 | # Accept absolute paths. |
| 886 | [[\\/]* | [A-Za-z]:[\\/]*)] |
| 887 | [re_direlt='/[^/][^/]*/\.\./'] |
| 888 | # Canonicalize the path of ld |
| 889 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 890 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 891 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 892 | done |
| 893 | test -z "$LD" && LD="$ac_prog" |
| 894 | ;; |
| 895 | "") |
| 896 | # If it fails, then pretend we aren't using GCC. |
| 897 | ac_prog=ld |
| 898 | ;; |
| 899 | *) |
| 900 | # If it is relative, then search for the first ld in PATH. |
| 901 | with_gnu_ld=unknown |
| 902 | ;; |
| 903 | esac |
| 904 | elif test "$with_gnu_ld" = yes; then |
| 905 | AC_MSG_CHECKING([for GNU ld]) |
| 906 | else |
| 907 | AC_MSG_CHECKING([for non-GNU ld]) |
| 908 | fi |
| 909 | AC_CACHE_VAL(acl_cv_path_LD, |
| 910 | [if test -z "$LD"; then |
| 911 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
| 912 | for ac_dir in $PATH; do |
| 913 | test -z "$ac_dir" && ac_dir=. |
| 914 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 915 | acl_cv_path_LD="$ac_dir/$ac_prog" |
| 916 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 917 | # but apparently some GNU ld's only accept -v. |
| 918 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 919 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
| 920 | *GNU* | *'with BFD'*) |
| 921 | test "$with_gnu_ld" != no && break ;; |
| 922 | *) |
| 923 | test "$with_gnu_ld" != yes && break ;; |
| 924 | esac |
| 925 | fi |
| 926 | done |
| 927 | IFS="$ac_save_ifs" |
| 928 | else |
| 929 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
| 930 | fi]) |
| 931 | LD="$acl_cv_path_LD" |
| 932 | if test -n "$LD"; then |
| 933 | AC_MSG_RESULT($LD) |
| 934 | else |
| 935 | AC_MSG_RESULT(no) |
| 936 | fi |
| 937 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 938 | AC_LIB_PROG_LD_GNU |
| 939 | ]) |
| 940 | |
| 941 | # Do all the work for Automake. This macro actually does too much -- |
| 942 | # some checks are only needed if your package does certain things. |
| 943 | # But this isn't really a big deal. |
| 944 | |
| 945 | # serial 1 |
| 946 | |
| 947 | dnl Usage: |
| 948 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
| 949 | |
| 950 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 951 | [AC_REQUIRE([AC_PROG_INSTALL]) |
| 952 | PACKAGE=[$1] |
| 953 | AC_SUBST(PACKAGE) |
| 954 | VERSION=[$2] |
| 955 | AC_SUBST(VERSION) |
| 956 | dnl test to see if srcdir already configured |
| 957 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
| 958 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 959 | fi |
| 960 | ifelse([$3],, |
| 961 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
| 962 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
| 963 | AC_REQUIRE([AM_SANITY_CHECK]) |
| 964 | AC_REQUIRE([AC_ARG_PROGRAM]) |
| 965 | dnl FIXME This is truly gross. |
| 966 | missing_dir=`cd $ac_aux_dir && pwd` |
| 967 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
| 968 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
| 969 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
| 970 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
| 971 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
| 972 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
| 973 | |
| 974 | # |
| 975 | # Check to make sure that the build environment is sane. |
| 976 | # |
| 977 | |
| 978 | AC_DEFUN([AM_SANITY_CHECK], |
| 979 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 980 | # Just in case |
| 981 | sleep 1 |
| 982 | echo timestamp > conftestfile |
| 983 | # Do `set' in a subshell so we don't clobber the current shell's |
| 984 | # arguments. Must try -L first in case configure is actually a |
| 985 | # symlink; some systems play weird games with the mod time of symlinks |
| 986 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 987 | # directory). |
| 988 | if ( |
| 989 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
| 990 | if test "[$]*" = "X"; then |
| 991 | # -L didn't work. |
| 992 | set X `ls -t $srcdir/configure conftestfile` |
| 993 | fi |
| 994 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
| 995 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
| 996 | |
| 997 | # If neither matched, then we have a broken ls. This can happen |
| 998 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 999 | # broken ls alias from the environment. This has actually |
| 1000 | # happened. Such a system could not be considered "sane". |
| 1001 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 1002 | alias in your environment]) |
| 1003 | fi |
| 1004 | |
| 1005 | test "[$]2" = conftestfile |
| 1006 | ) |
| 1007 | then |
| 1008 | # Ok. |
| 1009 | : |
| 1010 | else |
| 1011 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 1012 | Check your system clock]) |
| 1013 | fi |
| 1014 | rm -f conftest* |
| 1015 | AC_MSG_RESULT(yes)]) |
| 1016 | |
| 1017 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
| 1018 | dnl The program must properly implement --version. |
| 1019 | AC_DEFUN([AM_MISSING_PROG], |
| 1020 | [AC_MSG_CHECKING(for working $2) |
| 1021 | # Run test in a subshell; some versions of sh will print an error if |
| 1022 | # an executable is not found, even if stderr is redirected. |
| 1023 | # Redirect stdin to placate older versions of autoconf. Sigh. |
| 1024 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
| 1025 | $1=$2 |
| 1026 | AC_MSG_RESULT(found) |
| 1027 | else |
| 1028 | $1="$3/missing $2" |
| 1029 | AC_MSG_RESULT(missing) |
| 1030 | fi |
| 1031 | AC_SUBST($1)]) |
| 1032 | |
| 1033 | # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
| 1034 | |
| 1035 | # serial 46 AC_PROG_LIBTOOL |
| 1036 | |
| 1037 | AC_DEFUN([AC_PROG_LIBTOOL], |
| 1038 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
| 1039 | |
| 1040 | # This can be used to rebuild libtool when needed |
| 1041 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
| 1042 | |
| 1043 | # Always use our own libtool. |
| 1044 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
| 1045 | AC_SUBST(LIBTOOL)dnl |
| 1046 | |
| 1047 | # Prevent multiple expansion |
| 1048 | define([AC_PROG_LIBTOOL], []) |
| 1049 | ]) |
| 1050 | |
| 1051 | AC_DEFUN([AC_LIBTOOL_SETUP], |
| 1052 | [AC_PREREQ(2.13)dnl |
| 1053 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
| 1054 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
| 1055 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
| 1056 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 1057 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 1058 | AC_REQUIRE([AC_PROG_CC])dnl |
| 1059 | AC_REQUIRE([AC_PROG_LD])dnl |
| 1060 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
| 1061 | AC_REQUIRE([AC_PROG_NM])dnl |
| 1062 | AC_REQUIRE([AC_PROG_LN_S])dnl |
| 1063 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
| 1064 | AC_REQUIRE([AC_OBJEXT])dnl |
| 1065 | AC_REQUIRE([AC_EXEEXT])dnl |
| 1066 | dnl |
| 1067 | |
| 1068 | _LT_AC_PROG_ECHO_BACKSLASH |
| 1069 | # Only perform the check for file, if the check method requires it |
| 1070 | case $deplibs_check_method in |
| 1071 | file_magic*) |
| 1072 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
| 1073 | AC_PATH_MAGIC |
| 1074 | fi |
| 1075 | ;; |
| 1076 | esac |
| 1077 | |
| 1078 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 1079 | AC_CHECK_TOOL(STRIP, strip, :) |
| 1080 | |
| 1081 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
| 1082 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 1083 | enable_win32_dll=yes, enable_win32_dll=no) |
| 1084 | |
| 1085 | AC_ARG_ENABLE(libtool-lock, |
| 1086 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
| 1087 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 1088 | |
| 1089 | # Some flags need to be propagated to the compiler or linker for good |
| 1090 | # libtool support. |
| 1091 | case $host in |
| 1092 | *-*-irix6*) |
| 1093 | # Find out which ABI we are using. |
| 1094 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
| 1095 | if AC_TRY_EVAL(ac_compile); then |
| 1096 | case `/usr/bin/file conftest.$ac_objext` in |
| 1097 | *32-bit*) |
| 1098 | LD="${LD-ld} -32" |
| 1099 | ;; |
| 1100 | *N32*) |
| 1101 | LD="${LD-ld} -n32" |
| 1102 | ;; |
| 1103 | *64-bit*) |
| 1104 | LD="${LD-ld} -64" |
| 1105 | ;; |
| 1106 | esac |
| 1107 | fi |
| 1108 | rm -rf conftest* |
| 1109 | ;; |
| 1110 | |
| 1111 | *-*-sco3.2v5*) |
| 1112 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 1113 | SAVE_CFLAGS="$CFLAGS" |
| 1114 | CFLAGS="$CFLAGS -belf" |
| 1115 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 1116 | [AC_LANG_SAVE |
| 1117 | AC_LANG_C |
| 1118 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 1119 | AC_LANG_RESTORE]) |
| 1120 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
| 1121 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 1122 | CFLAGS="$SAVE_CFLAGS" |
| 1123 | fi |
| 1124 | ;; |
| 1125 | |
| 1126 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 1127 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
| 1128 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 1129 | AC_CHECK_TOOL(AS, as, false) |
| 1130 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 1131 | |
| 1132 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 1133 | # can override, but on older systems we have to supply one |
| 1134 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
| 1135 | [AC_TRY_LINK([], |
| 1136 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
| 1137 | DllMain (0, 0, 0);], |
| 1138 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
| 1139 | |
| 1140 | case $host/$CC in |
| 1141 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
| 1142 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
| 1143 | # require "-mdll" |
| 1144 | SAVE_CFLAGS="$CFLAGS" |
| 1145 | CFLAGS="$CFLAGS -mdll" |
| 1146 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
| 1147 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
| 1148 | CFLAGS="$SAVE_CFLAGS" ;; |
| 1149 | *-*-cygwin* | *-*-pw32*) |
| 1150 | # cygwin systems need to pass --dll to the linker, and not link |
| 1151 | # crt.o which will require a WinMain@16 definition. |
| 1152 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
| 1153 | esac |
| 1154 | ;; |
| 1155 | ]) |
| 1156 | esac |
| 1157 | |
| 1158 | _LT_AC_LTCONFIG_HACK |
| 1159 | |
| 1160 | ]) |
| 1161 | |
| 1162 | # AC_LIBTOOL_HEADER_ASSERT |
| 1163 | # ------------------------ |
| 1164 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
| 1165 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
| 1166 | [lt_cv_func_assert_works], |
| 1167 | [case $host in |
| 1168 | *-*-solaris*) |
| 1169 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
| 1170 | case `$CC --version 2>/dev/null` in |
| 1171 | [[12]].*) lt_cv_func_assert_works=no ;; |
| 1172 | *) lt_cv_func_assert_works=yes ;; |
| 1173 | esac |
| 1174 | fi |
| 1175 | ;; |
| 1176 | esac]) |
| 1177 | |
| 1178 | if test "x$lt_cv_func_assert_works" = xyes; then |
| 1179 | AC_CHECK_HEADERS(assert.h) |
| 1180 | fi |
| 1181 | ])# AC_LIBTOOL_HEADER_ASSERT |
| 1182 | |
| 1183 | # _LT_AC_CHECK_DLFCN |
| 1184 | # -------------------- |
| 1185 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
| 1186 | [AC_CHECK_HEADERS(dlfcn.h) |
| 1187 | ])# _LT_AC_CHECK_DLFCN |
| 1188 | |
| 1189 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 1190 | # --------------------------------- |
| 1191 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
| 1192 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
| 1193 | AC_REQUIRE([AC_PROG_NM]) |
| 1194 | AC_REQUIRE([AC_OBJEXT]) |
| 1195 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
| 1196 | AC_MSG_CHECKING([command to parse $NM output]) |
| 1197 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
| 1198 | |
| 1199 | # These are sane defaults that work on at least a few old systems. |
| 1200 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 1201 | |
| 1202 | # Character class describing NM global symbol codes. |
| 1203 | symcode='[[BCDEGRST]]' |
| 1204 | |
| 1205 | # Regexp to match symbols that can be accessed directly from C. |
| 1206 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 1207 | |
| 1208 | # Transform the above into a raw symbol and a C symbol. |
| 1209 | symxfrm='\1 \2\3 \3' |
| 1210 | |
| 1211 | # Transform an extracted symbol line into a proper C declaration |
| 1212 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
| 1213 | |
| 1214 | # Transform an extracted symbol line into symbol name and symbol address |
| 1215 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 1216 | |
| 1217 | # Define system-specific variables. |
| 1218 | case $host_os in |
| 1219 | aix*) |
| 1220 | symcode='[[BCDT]]' |
| 1221 | ;; |
| 1222 | cygwin* | mingw* | pw32*) |
| 1223 | symcode='[[ABCDGISTW]]' |
| 1224 | ;; |
| 1225 | hpux*) # Its linker distinguishes data from code symbols |
| 1226 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 1227 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 1228 | ;; |
| 1229 | irix*) |
| 1230 | symcode='[[BCDEGRST]]' |
| 1231 | ;; |
| 1232 | solaris* | sysv5*) |
| 1233 | symcode='[[BDT]]' |
| 1234 | ;; |
| 1235 | sysv4) |
| 1236 | symcode='[[DFNSTU]]' |
| 1237 | ;; |
| 1238 | esac |
| 1239 | |
| 1240 | # Handle CRLF in mingw tool chain |
| 1241 | opt_cr= |
| 1242 | case $host_os in |
| 1243 | mingw*) |
| 1244 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 1245 | ;; |
| 1246 | esac |
| 1247 | |
| 1248 | # If we're using GNU nm, then use its standard symbol codes. |
| 1249 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
| 1250 | symcode='[[ABCDGISTW]]' |
| 1251 | fi |
| 1252 | |
| 1253 | # Try without a prefix undercore, then with it. |
| 1254 | for ac_symprfx in "" "_"; do |
| 1255 | |
| 1256 | # Write the raw and C identifiers. |
| 1257 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
| 1258 | |
| 1259 | # Check to see that the pipe works correctly. |
| 1260 | pipe_works=no |
| 1261 | rm -f conftest* |
| 1262 | cat > conftest.$ac_ext <<EOF |
| 1263 | #ifdef __cplusplus |
| 1264 | extern "C" { |
| 1265 | #endif |
| 1266 | char nm_test_var; |
| 1267 | void nm_test_func(){} |
| 1268 | #ifdef __cplusplus |
| 1269 | } |
| 1270 | #endif |
| 1271 | int main(){nm_test_var='a';nm_test_func();return(0);} |
| 1272 | EOF |
| 1273 | |
| 1274 | if AC_TRY_EVAL(ac_compile); then |
| 1275 | # Now try to grab the symbols. |
| 1276 | nlist=conftest.nm |
| 1277 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
| 1278 | # Try sorting and uniquifying the output. |
| 1279 | if sort "$nlist" | uniq > "$nlist"T; then |
| 1280 | mv -f "$nlist"T "$nlist" |
| 1281 | else |
| 1282 | rm -f "$nlist"T |
| 1283 | fi |
| 1284 | |
| 1285 | # Make sure that we snagged all the symbols we need. |
| 1286 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
| 1287 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
| 1288 | cat <<EOF > conftest.$ac_ext |
| 1289 | #ifdef __cplusplus |
| 1290 | extern "C" { |
| 1291 | #endif |
| 1292 | |
| 1293 | EOF |
| 1294 | # Now generate the symbol file. |
| 1295 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
| 1296 | |
| 1297 | cat <<EOF >> conftest.$ac_ext |
| 1298 | #if defined (__STDC__) && __STDC__ |
| 1299 | # define lt_ptr void * |
| 1300 | #else |
| 1301 | # define lt_ptr char * |
| 1302 | # define const |
| 1303 | #endif |
| 1304 | |
| 1305 | /* The mapping between symbol names and symbols. */ |
| 1306 | const struct { |
| 1307 | const char *name; |
| 1308 | lt_ptr address; |
| 1309 | } |
| 1310 | lt_preloaded_symbols[[]] = |
| 1311 | { |
| 1312 | EOF |
| 1313 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
| 1314 | cat <<\EOF >> conftest.$ac_ext |
| 1315 | {0, (lt_ptr) 0} |
| 1316 | }; |
| 1317 | |
| 1318 | #ifdef __cplusplus |
| 1319 | } |
| 1320 | #endif |
| 1321 | EOF |
| 1322 | # Now try linking the two files. |
| 1323 | mv conftest.$ac_objext conftstm.$ac_objext |
| 1324 | save_LIBS="$LIBS" |
| 1325 | save_CFLAGS="$CFLAGS" |
| 1326 | LIBS="conftstm.$ac_objext" |
| 1327 | CFLAGS="$CFLAGS$no_builtin_flag" |
| 1328 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 1329 | pipe_works=yes |
| 1330 | fi |
| 1331 | LIBS="$save_LIBS" |
| 1332 | CFLAGS="$save_CFLAGS" |
| 1333 | else |
| 1334 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
| 1335 | fi |
| 1336 | else |
| 1337 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
| 1338 | fi |
| 1339 | else |
| 1340 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
| 1341 | fi |
| 1342 | else |
| 1343 | echo "$progname: failed program was:" >&AC_FD_CC |
| 1344 | cat conftest.$ac_ext >&5 |
| 1345 | fi |
| 1346 | rm -f conftest* conftst* |
| 1347 | |
| 1348 | # Do not use the global_symbol_pipe unless it works. |
| 1349 | if test "$pipe_works" = yes; then |
| 1350 | break |
| 1351 | else |
| 1352 | lt_cv_sys_global_symbol_pipe= |
| 1353 | fi |
| 1354 | done |
| 1355 | ]) |
| 1356 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
| 1357 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 1358 | global_symbol_to_cdecl= |
| 1359 | global_symbol_to_c_name_address= |
| 1360 | else |
| 1361 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
| 1362 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
| 1363 | fi |
| 1364 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
| 1365 | then |
| 1366 | AC_MSG_RESULT(failed) |
| 1367 | else |
| 1368 | AC_MSG_RESULT(ok) |
| 1369 | fi |
| 1370 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 1371 | |
| 1372 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 1373 | # --------------------------------- |
| 1374 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
| 1375 | [# Find the correct PATH separator. Usually this is `:', but |
| 1376 | # DJGPP uses `;' like DOS. |
| 1377 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
| 1378 | UNAME=${UNAME-`uname 2>/dev/null`} |
| 1379 | case X$UNAME in |
| 1380 | *-DOS) lt_cv_sys_path_separator=';' ;; |
| 1381 | *) lt_cv_sys_path_separator=':' ;; |
| 1382 | esac |
| 1383 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
| 1384 | fi |
| 1385 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 1386 | |
| 1387 | # _LT_AC_PROG_ECHO_BACKSLASH |
| 1388 | # -------------------------- |
| 1389 | # Add some code to the start of the generated configure script which |
| 1390 | # will find an echo command which doesn't interpret backslashes. |
| 1391 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
| 1392 | [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
| 1393 | [AC_DIVERT_PUSH(NOTICE)]) |
| 1394 | _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 1395 | |
| 1396 | # Check that we are running under the correct shell. |
| 1397 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 1398 | |
| 1399 | case X$ECHO in |
| 1400 | X*--fallback-echo) |
| 1401 | # Remove one level of quotation (which was required for Make). |
| 1402 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
| 1403 | ;; |
| 1404 | esac |
| 1405 | |
| 1406 | echo=${ECHO-echo} |
| 1407 | if test "X[$]1" = X--no-reexec; then |
| 1408 | # Discard the --no-reexec flag, and continue. |
| 1409 | shift |
| 1410 | elif test "X[$]1" = X--fallback-echo; then |
| 1411 | # Avoid inline document here, it may be left over |
| 1412 | : |
| 1413 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
| 1414 | # Yippee, $echo works! |
| 1415 | : |
| 1416 | else |
| 1417 | # Restart under the correct shell. |
| 1418 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 1419 | fi |
| 1420 | |
| 1421 | if test "X[$]1" = X--fallback-echo; then |
| 1422 | # used as fallback echo |
| 1423 | shift |
| 1424 | cat <<EOF |
| 1425 | $* |
| 1426 | EOF |
| 1427 | exit 0 |
| 1428 | fi |
| 1429 | |
| 1430 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 1431 | # if CDPATH is set. |
| 1432 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 1433 | |
| 1434 | if test -z "$ECHO"; then |
| 1435 | if test "X${echo_test_string+set}" != Xset; then |
| 1436 | # find a string as large as possible, as long as the shell can cope with it |
| 1437 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
| 1438 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
| 1439 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
| 1440 | echo_test_string="`eval $cmd`" && |
| 1441 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
| 1442 | then |
| 1443 | break |
| 1444 | fi |
| 1445 | done |
| 1446 | fi |
| 1447 | |
| 1448 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 1449 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 1450 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1451 | : |
| 1452 | else |
| 1453 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
| 1454 | # backslashes. This makes it impossible to quote backslashes using |
| 1455 | # echo "$something" | sed 's/\\/\\\\/g' |
| 1456 | # |
| 1457 | # So, first we look for a working echo in the user's PATH. |
| 1458 | |
| 1459 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 1460 | for dir in $PATH /usr/ucb; do |
| 1461 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
| 1462 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
| 1463 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
| 1464 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1465 | echo="$dir/echo" |
| 1466 | break |
| 1467 | fi |
| 1468 | done |
| 1469 | IFS="$save_ifs" |
| 1470 | |
| 1471 | if test "X$echo" = Xecho; then |
| 1472 | # We didn't find a better echo, so look for alternatives. |
| 1473 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
| 1474 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
| 1475 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1476 | # This shell has a builtin print -r that does the trick. |
| 1477 | echo='print -r' |
| 1478 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
| 1479 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
| 1480 | # If we have ksh, try running configure again with it. |
| 1481 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| 1482 | export ORIGINAL_CONFIG_SHELL |
| 1483 | CONFIG_SHELL=/bin/ksh |
| 1484 | export CONFIG_SHELL |
| 1485 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 1486 | else |
| 1487 | # Try using printf. |
| 1488 | echo='printf %s\n' |
| 1489 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 1490 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 1491 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1492 | # Cool, printf works |
| 1493 | : |
| 1494 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 1495 | test "X$echo_testing_string" = 'X\t' && |
| 1496 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 1497 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1498 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
| 1499 | export CONFIG_SHELL |
| 1500 | SHELL="$CONFIG_SHELL" |
| 1501 | export SHELL |
| 1502 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 1503 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 1504 | test "X$echo_testing_string" = 'X\t' && |
| 1505 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 1506 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 1507 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 1508 | else |
| 1509 | # maybe with a smaller string... |
| 1510 | prev=: |
| 1511 | |
| 1512 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
| 1513 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
| 1514 | then |
| 1515 | break |
| 1516 | fi |
| 1517 | prev="$cmd" |
| 1518 | done |
| 1519 | |
| 1520 | if test "$prev" != 'sed 50q "[$]0"'; then |
| 1521 | echo_test_string=`eval $prev` |
| 1522 | export echo_test_string |
| 1523 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
| 1524 | else |
| 1525 | # Oops. We lost completely, so just stick with echo. |
| 1526 | echo=echo |
| 1527 | fi |
| 1528 | fi |
| 1529 | fi |
| 1530 | fi |
| 1531 | fi |
| 1532 | fi |
| 1533 | |
| 1534 | # Copy echo and quote the copy suitably for passing to libtool from |
| 1535 | # the Makefile, instead of quoting the original, which is used later. |
| 1536 | ECHO=$echo |
| 1537 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
| 1538 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
| 1539 | fi |
| 1540 | |
| 1541 | AC_SUBST(ECHO) |
| 1542 | AC_DIVERT_POP |
| 1543 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
| 1544 | |
| 1545 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
| 1546 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
| 1547 | # ------------------------------------------------------------------ |
| 1548 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
| 1549 | [if test "$cross_compiling" = yes; then : |
| 1550 | [$4] |
| 1551 | else |
| 1552 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 1553 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
| 1554 | lt_status=$lt_dlunknown |
| 1555 | cat > conftest.$ac_ext <<EOF |
| 1556 | [#line __oline__ "configure" |
| 1557 | #include "confdefs.h" |
| 1558 | |
| 1559 | #if HAVE_DLFCN_H |
| 1560 | #include <dlfcn.h> |
| 1561 | #endif |
| 1562 | |
| 1563 | #include <stdio.h> |
| 1564 | |
| 1565 | #ifdef RTLD_GLOBAL |
| 1566 | # define LT_DLGLOBAL RTLD_GLOBAL |
| 1567 | #else |
| 1568 | # ifdef DL_GLOBAL |
| 1569 | # define LT_DLGLOBAL DL_GLOBAL |
| 1570 | # else |
| 1571 | # define LT_DLGLOBAL 0 |
| 1572 | # endif |
| 1573 | #endif |
| 1574 | |
| 1575 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
| 1576 | find out it does not work in some platform. */ |
| 1577 | #ifndef LT_DLLAZY_OR_NOW |
| 1578 | # ifdef RTLD_LAZY |
| 1579 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
| 1580 | # else |
| 1581 | # ifdef DL_LAZY |
| 1582 | # define LT_DLLAZY_OR_NOW DL_LAZY |
| 1583 | # else |
| 1584 | # ifdef RTLD_NOW |
| 1585 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
| 1586 | # else |
| 1587 | # ifdef DL_NOW |
| 1588 | # define LT_DLLAZY_OR_NOW DL_NOW |
| 1589 | # else |
| 1590 | # define LT_DLLAZY_OR_NOW 0 |
| 1591 | # endif |
| 1592 | # endif |
| 1593 | # endif |
| 1594 | # endif |
| 1595 | #endif |
| 1596 | |
| 1597 | #ifdef __cplusplus |
| 1598 | extern "C" void exit (int); |
| 1599 | #endif |
| 1600 | |
| 1601 | void fnord() { int i=42;} |
| 1602 | int main () |
| 1603 | { |
| 1604 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
| 1605 | int status = $lt_dlunknown; |
| 1606 | |
| 1607 | if (self) |
| 1608 | { |
| 1609 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
| 1610 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
| 1611 | /* dlclose (self); */ |
| 1612 | } |
| 1613 | |
| 1614 | exit (status); |
| 1615 | }] |
| 1616 | EOF |
| 1617 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
| 1618 | (./conftest; exit; ) 2>/dev/null |
| 1619 | lt_status=$? |
| 1620 | case x$lt_status in |
| 1621 | x$lt_dlno_uscore) $1 ;; |
| 1622 | x$lt_dlneed_uscore) $2 ;; |
| 1623 | x$lt_unknown|x*) $3 ;; |
| 1624 | esac |
| 1625 | else : |
| 1626 | # compilation failed |
| 1627 | $3 |
| 1628 | fi |
| 1629 | fi |
| 1630 | rm -fr conftest* |
| 1631 | ])# _LT_AC_TRY_DLOPEN_SELF |
| 1632 | |
| 1633 | # AC_LIBTOOL_DLOPEN_SELF |
| 1634 | # ------------------- |
| 1635 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
| 1636 | [if test "x$enable_dlopen" != xyes; then |
| 1637 | enable_dlopen=unknown |
| 1638 | enable_dlopen_self=unknown |
| 1639 | enable_dlopen_self_static=unknown |
| 1640 | else |
| 1641 | lt_cv_dlopen=no |
| 1642 | lt_cv_dlopen_libs= |
| 1643 | |
| 1644 | case $host_os in |
| 1645 | beos*) |
| 1646 | lt_cv_dlopen="load_add_on" |
| 1647 | lt_cv_dlopen_libs= |
| 1648 | lt_cv_dlopen_self=yes |
| 1649 | ;; |
| 1650 | |
| 1651 | cygwin* | mingw* | pw32*) |
| 1652 | lt_cv_dlopen="LoadLibrary" |
| 1653 | lt_cv_dlopen_libs= |
| 1654 | ;; |
| 1655 | |
| 1656 | *) |
| 1657 | AC_CHECK_FUNC([shl_load], |
| 1658 | [lt_cv_dlopen="shl_load"], |
| 1659 | [AC_CHECK_LIB([dld], [shl_load], |
| 1660 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
| 1661 | [AC_CHECK_FUNC([dlopen], |
| 1662 | [lt_cv_dlopen="dlopen"], |
| 1663 | [AC_CHECK_LIB([dl], [dlopen], |
| 1664 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
| 1665 | [AC_CHECK_LIB([svld], [dlopen], |
| 1666 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
| 1667 | [AC_CHECK_LIB([dld], [dld_link], |
| 1668 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
| 1669 | ]) |
| 1670 | ]) |
| 1671 | ]) |
| 1672 | ]) |
| 1673 | ]) |
| 1674 | ;; |
| 1675 | esac |
| 1676 | |
| 1677 | if test "x$lt_cv_dlopen" != xno; then |
| 1678 | enable_dlopen=yes |
| 1679 | else |
| 1680 | enable_dlopen=no |
| 1681 | fi |
| 1682 | |
| 1683 | case $lt_cv_dlopen in |
| 1684 | dlopen) |
| 1685 | save_CPPFLAGS="$CPPFLAGS" |
| 1686 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 1687 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
| 1688 | |
| 1689 | save_LDFLAGS="$LDFLAGS" |
| 1690 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
| 1691 | |
| 1692 | save_LIBS="$LIBS" |
| 1693 | LIBS="$lt_cv_dlopen_libs $LIBS" |
| 1694 | |
| 1695 | AC_CACHE_CHECK([whether a program can dlopen itself], |
| 1696 | lt_cv_dlopen_self, [dnl |
| 1697 | _LT_AC_TRY_DLOPEN_SELF( |
| 1698 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
| 1699 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
| 1700 | ]) |
| 1701 | |
| 1702 | if test "x$lt_cv_dlopen_self" = xyes; then |
| 1703 | LDFLAGS="$LDFLAGS $link_static_flag" |
| 1704 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
| 1705 | lt_cv_dlopen_self_static, [dnl |
| 1706 | _LT_AC_TRY_DLOPEN_SELF( |
| 1707 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
| 1708 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
| 1709 | ]) |
| 1710 | fi |
| 1711 | |
| 1712 | CPPFLAGS="$save_CPPFLAGS" |
| 1713 | LDFLAGS="$save_LDFLAGS" |
| 1714 | LIBS="$save_LIBS" |
| 1715 | ;; |
| 1716 | esac |
| 1717 | |
| 1718 | case $lt_cv_dlopen_self in |
| 1719 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
| 1720 | *) enable_dlopen_self=unknown ;; |
| 1721 | esac |
| 1722 | |
| 1723 | case $lt_cv_dlopen_self_static in |
| 1724 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
| 1725 | *) enable_dlopen_self_static=unknown ;; |
| 1726 | esac |
| 1727 | fi |
| 1728 | ])# AC_LIBTOOL_DLOPEN_SELF |
| 1729 | |
| 1730 | AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
| 1731 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
| 1732 | # Sed substitution that helps us do robust quoting. It backslashifies |
| 1733 | # metacharacters that are still active within double-quoted strings. |
| 1734 | Xsed='sed -e s/^X//' |
| 1735 | sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
| 1736 | |
| 1737 | # Same as above, but do not quote variable references. |
| 1738 | double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
| 1739 | |
| 1740 | # Sed substitution to delay expansion of an escaped shell variable in a |
| 1741 | # double_quote_subst'ed string. |
| 1742 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
| 1743 | |
| 1744 | # Constants: |
| 1745 | rm="rm -f" |
| 1746 | |
| 1747 | # Global variables: |
| 1748 | default_ofile=libtool |
| 1749 | can_build_shared=yes |
| 1750 | |
| 1751 | # All known linkers require a `.a' archive for static linking (except M$VC, |
| 1752 | # which needs '.lib'). |
| 1753 | libext=a |
| 1754 | ltmain="$ac_aux_dir/ltmain.sh" |
| 1755 | ofile="$default_ofile" |
| 1756 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
| 1757 | need_locks="$enable_libtool_lock" |
| 1758 | |
| 1759 | old_CC="$CC" |
| 1760 | old_CFLAGS="$CFLAGS" |
| 1761 | |
| 1762 | # Set sane defaults for various variables |
| 1763 | test -z "$AR" && AR=ar |
| 1764 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
| 1765 | test -z "$AS" && AS=as |
| 1766 | test -z "$CC" && CC=cc |
| 1767 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 1768 | test -z "$LD" && LD=ld |
| 1769 | test -z "$LN_S" && LN_S="ln -s" |
| 1770 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
| 1771 | test -z "$NM" && NM=nm |
| 1772 | test -z "$OBJDUMP" && OBJDUMP=objdump |
| 1773 | test -z "$RANLIB" && RANLIB=: |
| 1774 | test -z "$STRIP" && STRIP=: |
| 1775 | test -z "$ac_objext" && ac_objext=o |
| 1776 | |
| 1777 | if test x"$host" != x"$build"; then |
| 1778 | ac_tool_prefix=${host_alias}- |
| 1779 | else |
| 1780 | ac_tool_prefix= |
| 1781 | fi |
| 1782 | |
| 1783 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
| 1784 | case $host_os in |
| 1785 | linux-gnu*) ;; |
| 1786 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
| 1787 | esac |
| 1788 | |
| 1789 | case $host_os in |
| 1790 | aix3*) |
| 1791 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 1792 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 1793 | # vanish in a puff of smoke. |
| 1794 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 1795 | COLLECT_NAMES= |
| 1796 | export COLLECT_NAMES |
| 1797 | fi |
| 1798 | ;; |
| 1799 | esac |
| 1800 | |
| 1801 | # Determine commands to create old-style static archives. |
| 1802 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
| 1803 | old_postinstall_cmds='chmod 644 $oldlib' |
| 1804 | old_postuninstall_cmds= |
| 1805 | |
| 1806 | if test -n "$RANLIB"; then |
| 1807 | case $host_os in |
| 1808 | openbsd*) |
| 1809 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
| 1810 | ;; |
| 1811 | *) |
| 1812 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
| 1813 | ;; |
| 1814 | esac |
| 1815 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
| 1816 | fi |
| 1817 | |
| 1818 | # Allow CC to be a program name with arguments. |
| 1819 | set dummy $CC |
| 1820 | compiler="[$]2" |
| 1821 | |
| 1822 | AC_MSG_CHECKING([for objdir]) |
| 1823 | rm -f .libs 2>/dev/null |
| 1824 | mkdir .libs 2>/dev/null |
| 1825 | if test -d .libs; then |
| 1826 | objdir=.libs |
| 1827 | else |
| 1828 | # MS-DOS does not allow filenames that begin with a dot. |
| 1829 | objdir=_libs |
| 1830 | fi |
| 1831 | rmdir .libs 2>/dev/null |
| 1832 | AC_MSG_RESULT($objdir) |
| 1833 | |
| 1834 | |
| 1835 | AC_ARG_WITH(pic, |
| 1836 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
| 1837 | pic_mode="$withval", pic_mode=default) |
| 1838 | test -z "$pic_mode" && pic_mode=default |
| 1839 | |
| 1840 | # We assume here that the value for lt_cv_prog_cc_pic will not be cached |
| 1841 | # in isolation, and that seeing it set (from the cache) indicates that |
| 1842 | # the associated values are set (in the cache) correctly too. |
| 1843 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
| 1844 | AC_CACHE_VAL(lt_cv_prog_cc_pic, |
| 1845 | [ lt_cv_prog_cc_pic= |
| 1846 | lt_cv_prog_cc_shlib= |
| 1847 | lt_cv_prog_cc_wl= |
| 1848 | lt_cv_prog_cc_static= |
| 1849 | lt_cv_prog_cc_no_builtin= |
| 1850 | lt_cv_prog_cc_can_build_shared=$can_build_shared |
| 1851 | |
| 1852 | if test "$GCC" = yes; then |
| 1853 | lt_cv_prog_cc_wl='-Wl,' |
| 1854 | lt_cv_prog_cc_static='-static' |
| 1855 | |
| 1856 | case $host_os in |
| 1857 | aix*) |
| 1858 | # Below there is a dirty hack to force normal static linking with -ldl |
| 1859 | # The problem is because libdl dynamically linked with both libc and |
| 1860 | # libC (AIX C++ library), which obviously doesn't included in libraries |
| 1861 | # list by gcc. This cause undefined symbols with -static flags. |
| 1862 | # This hack allows C programs to be linked with "-static -ldl", but |
| 1863 | # not sure about C++ programs. |
| 1864 | lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
| 1865 | ;; |
| 1866 | amigaos*) |
| 1867 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 1868 | # adding the `-m68020' flag to GCC prevents building anything better, |
| 1869 | # like `-m68040'. |
| 1870 | lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
| 1871 | ;; |
| 1872 | beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
| 1873 | # PIC is the default for these OSes. |
| 1874 | ;; |
| 1875 | darwin* | rhapsody*) |
| 1876 | # PIC is the default on this platform |
| 1877 | # Common symbols not allowed in MH_DYLIB files |
| 1878 | lt_cv_prog_cc_pic='-fno-common' |
| 1879 | ;; |
| 1880 | cygwin* | mingw* | pw32* | os2*) |
| 1881 | # This hack is so that the source file can tell whether it is being |
| 1882 | # built for inclusion in a dll (and should export symbols for example). |
| 1883 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
| 1884 | ;; |
| 1885 | sysv4*MP*) |
| 1886 | if test -d /usr/nec; then |
| 1887 | lt_cv_prog_cc_pic=-Kconform_pic |
| 1888 | fi |
| 1889 | ;; |
| 1890 | *) |
| 1891 | lt_cv_prog_cc_pic='-fPIC' |
| 1892 | ;; |
| 1893 | esac |
| 1894 | else |
| 1895 | # PORTME Check for PIC flags for the system compiler. |
| 1896 | case $host_os in |
| 1897 | aix3* | aix4* | aix5*) |
| 1898 | lt_cv_prog_cc_wl='-Wl,' |
| 1899 | # All AIX code is PIC. |
| 1900 | if test "$host_cpu" = ia64; then |
| 1901 | # AIX 5 now supports IA64 processor |
| 1902 | lt_cv_prog_cc_static='-Bstatic' |
| 1903 | else |
| 1904 | lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
| 1905 | fi |
| 1906 | ;; |
| 1907 | |
| 1908 | hpux9* | hpux10* | hpux11*) |
| 1909 | # Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
| 1910 | lt_cv_prog_cc_wl='-Wl,' |
| 1911 | lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
| 1912 | lt_cv_prog_cc_pic='+Z' |
| 1913 | ;; |
| 1914 | |
| 1915 | irix5* | irix6*) |
| 1916 | lt_cv_prog_cc_wl='-Wl,' |
| 1917 | lt_cv_prog_cc_static='-non_shared' |
| 1918 | # PIC (with -KPIC) is the default. |
| 1919 | ;; |
| 1920 | |
| 1921 | cygwin* | mingw* | pw32* | os2*) |
| 1922 | # This hack is so that the source file can tell whether it is being |
| 1923 | # built for inclusion in a dll (and should export symbols for example). |
| 1924 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
| 1925 | ;; |
| 1926 | |
| 1927 | newsos6) |
| 1928 | lt_cv_prog_cc_pic='-KPIC' |
| 1929 | lt_cv_prog_cc_static='-Bstatic' |
| 1930 | ;; |
| 1931 | |
| 1932 | osf3* | osf4* | osf5*) |
| 1933 | # All OSF/1 code is PIC. |
| 1934 | lt_cv_prog_cc_wl='-Wl,' |
| 1935 | lt_cv_prog_cc_static='-non_shared' |
| 1936 | ;; |
| 1937 | |
| 1938 | sco3.2v5*) |
| 1939 | lt_cv_prog_cc_pic='-Kpic' |
| 1940 | lt_cv_prog_cc_static='-dn' |
| 1941 | lt_cv_prog_cc_shlib='-belf' |
| 1942 | ;; |
| 1943 | |
| 1944 | solaris*) |
| 1945 | lt_cv_prog_cc_pic='-KPIC' |
| 1946 | lt_cv_prog_cc_static='-Bstatic' |
| 1947 | lt_cv_prog_cc_wl='-Wl,' |
| 1948 | ;; |
| 1949 | |
| 1950 | sunos4*) |
| 1951 | lt_cv_prog_cc_pic='-PIC' |
| 1952 | lt_cv_prog_cc_static='-Bstatic' |
| 1953 | lt_cv_prog_cc_wl='-Qoption ld ' |
| 1954 | ;; |
| 1955 | |
| 1956 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 1957 | lt_cv_prog_cc_pic='-KPIC' |
| 1958 | lt_cv_prog_cc_static='-Bstatic' |
| 1959 | if test "x$host_vendor" = xsni; then |
| 1960 | lt_cv_prog_cc_wl='-LD' |
| 1961 | else |
| 1962 | lt_cv_prog_cc_wl='-Wl,' |
| 1963 | fi |
| 1964 | ;; |
| 1965 | |
| 1966 | uts4*) |
| 1967 | lt_cv_prog_cc_pic='-pic' |
| 1968 | lt_cv_prog_cc_static='-Bstatic' |
| 1969 | ;; |
| 1970 | |
| 1971 | sysv4*MP*) |
| 1972 | if test -d /usr/nec ;then |
| 1973 | lt_cv_prog_cc_pic='-Kconform_pic' |
| 1974 | lt_cv_prog_cc_static='-Bstatic' |
| 1975 | fi |
| 1976 | ;; |
| 1977 | |
| 1978 | *) |
| 1979 | lt_cv_prog_cc_can_build_shared=no |
| 1980 | ;; |
| 1981 | esac |
| 1982 | fi |
| 1983 | ]) |
| 1984 | if test -z "$lt_cv_prog_cc_pic"; then |
| 1985 | AC_MSG_RESULT([none]) |
| 1986 | else |
| 1987 | AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
| 1988 | |
| 1989 | # Check to make sure the pic_flag actually works. |
| 1990 | AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
| 1991 | AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
| 1992 | save_CFLAGS="$CFLAGS" |
| 1993 | CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
| 1994 | AC_TRY_COMPILE([], [], [dnl |
| 1995 | case $host_os in |
| 1996 | hpux9* | hpux10* | hpux11*) |
| 1997 | # On HP-UX, both CC and GCC only warn that PIC is supported... then |
| 1998 | # they create non-PIC objects. So, if there were any warnings, we |
| 1999 | # assume that PIC is not supported. |
| 2000 | if test -s conftest.err; then |
| 2001 | lt_cv_prog_cc_pic_works=no |
| 2002 | else |
| 2003 | lt_cv_prog_cc_pic_works=yes |
| 2004 | fi |
| 2005 | ;; |
| 2006 | *) |
| 2007 | lt_cv_prog_cc_pic_works=yes |
| 2008 | ;; |
| 2009 | esac |
| 2010 | ], [dnl |
| 2011 | lt_cv_prog_cc_pic_works=no |
| 2012 | ]) |
| 2013 | CFLAGS="$save_CFLAGS" |
| 2014 | ]) |
| 2015 | |
| 2016 | if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
| 2017 | lt_cv_prog_cc_pic= |
| 2018 | lt_cv_prog_cc_can_build_shared=no |
| 2019 | else |
| 2020 | lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
| 2021 | fi |
| 2022 | |
| 2023 | AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
| 2024 | fi |
| 2025 | |
| 2026 | # Check for any special shared library compilation flags. |
| 2027 | if test -n "$lt_cv_prog_cc_shlib"; then |
| 2028 | AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
| 2029 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
| 2030 | else |
| 2031 | AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
| 2032 | lt_cv_prog_cc_can_build_shared=no |
| 2033 | fi |
| 2034 | fi |
| 2035 | |
| 2036 | AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
| 2037 | AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
| 2038 | lt_cv_prog_cc_static_works=no |
| 2039 | save_LDFLAGS="$LDFLAGS" |
| 2040 | LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
| 2041 | AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
| 2042 | LDFLAGS="$save_LDFLAGS" |
| 2043 | ]) |
| 2044 | |
| 2045 | # Belt *and* braces to stop my trousers falling down: |
| 2046 | test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
| 2047 | AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
| 2048 | |
| 2049 | pic_flag="$lt_cv_prog_cc_pic" |
| 2050 | special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
| 2051 | wl="$lt_cv_prog_cc_wl" |
| 2052 | link_static_flag="$lt_cv_prog_cc_static" |
| 2053 | no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
| 2054 | can_build_shared="$lt_cv_prog_cc_can_build_shared" |
| 2055 | |
| 2056 | |
| 2057 | # Check to see if options -o and -c are simultaneously supported by compiler |
| 2058 | AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
| 2059 | AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
| 2060 | $rm -r conftest 2>/dev/null |
| 2061 | mkdir conftest |
| 2062 | cd conftest |
| 2063 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 2064 | mkdir out |
| 2065 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
| 2066 | # that will create temporary files in the current directory regardless of |
| 2067 | # the output directory. Thus, making CWD read-only will cause this test |
| 2068 | # to fail, enabling locking or at least warning the user not to do parallel |
| 2069 | # builds. |
| 2070 | chmod -w . |
| 2071 | save_CFLAGS="$CFLAGS" |
| 2072 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
| 2073 | compiler_c_o=no |
| 2074 | if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
| 2075 | # The compiler can only warn and ignore the option if not recognized |
| 2076 | # So say no if there are warnings |
| 2077 | if test -s out/conftest.err; then |
| 2078 | lt_cv_compiler_c_o=no |
| 2079 | else |
| 2080 | lt_cv_compiler_c_o=yes |
| 2081 | fi |
| 2082 | else |
| 2083 | # Append any errors to the config.log. |
| 2084 | cat out/conftest.err 1>&AC_FD_CC |
| 2085 | lt_cv_compiler_c_o=no |
| 2086 | fi |
| 2087 | CFLAGS="$save_CFLAGS" |
| 2088 | chmod u+w . |
| 2089 | $rm conftest* out/* |
| 2090 | rmdir out |
| 2091 | cd .. |
| 2092 | rmdir conftest |
| 2093 | $rm -r conftest 2>/dev/null |
| 2094 | ]) |
| 2095 | compiler_c_o=$lt_cv_compiler_c_o |
| 2096 | AC_MSG_RESULT([$compiler_c_o]) |
| 2097 | |
| 2098 | if test x"$compiler_c_o" = x"yes"; then |
| 2099 | # Check to see if we can write to a .lo |
| 2100 | AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
| 2101 | AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
| 2102 | lt_cv_compiler_o_lo=no |
| 2103 | save_CFLAGS="$CFLAGS" |
| 2104 | CFLAGS="$CFLAGS -c -o conftest.lo" |
| 2105 | save_objext="$ac_objext" |
| 2106 | ac_objext=lo |
| 2107 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
| 2108 | # The compiler can only warn and ignore the option if not recognized |
| 2109 | # So say no if there are warnings |
| 2110 | if test -s conftest.err; then |
| 2111 | lt_cv_compiler_o_lo=no |
| 2112 | else |
| 2113 | lt_cv_compiler_o_lo=yes |
| 2114 | fi |
| 2115 | ]) |
| 2116 | ac_objext="$save_objext" |
| 2117 | CFLAGS="$save_CFLAGS" |
| 2118 | ]) |
| 2119 | compiler_o_lo=$lt_cv_compiler_o_lo |
| 2120 | AC_MSG_RESULT([$compiler_o_lo]) |
| 2121 | else |
| 2122 | compiler_o_lo=no |
| 2123 | fi |
| 2124 | |
| 2125 | # Check to see if we can do hard links to lock some files if needed |
| 2126 | hard_links="nottested" |
| 2127 | if test "$compiler_c_o" = no && test "$need_locks" != no; then |
| 2128 | # do not overwrite the value of need_locks provided by the user |
| 2129 | AC_MSG_CHECKING([if we can lock with hard links]) |
| 2130 | hard_links=yes |
| 2131 | $rm conftest* |
| 2132 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 2133 | touch conftest.a |
| 2134 | ln conftest.a conftest.b 2>&5 || hard_links=no |
| 2135 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 2136 | AC_MSG_RESULT([$hard_links]) |
| 2137 | if test "$hard_links" = no; then |
| 2138 | AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
| 2139 | need_locks=warn |
| 2140 | fi |
| 2141 | else |
| 2142 | need_locks=no |
| 2143 | fi |
| 2144 | |
| 2145 | if test "$GCC" = yes; then |
| 2146 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
| 2147 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
| 2148 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 2149 | save_CFLAGS="$CFLAGS" |
| 2150 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
| 2151 | compiler_rtti_exceptions=no |
| 2152 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
| 2153 | # The compiler can only warn and ignore the option if not recognized |
| 2154 | # So say no if there are warnings |
| 2155 | if test -s conftest.err; then |
| 2156 | compiler_rtti_exceptions=no |
| 2157 | else |
| 2158 | compiler_rtti_exceptions=yes |
| 2159 | fi |
| 2160 | ]) |
| 2161 | CFLAGS="$save_CFLAGS" |
| 2162 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
| 2163 | |
| 2164 | if test "$compiler_rtti_exceptions" = "yes"; then |
| 2165 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
| 2166 | else |
| 2167 | no_builtin_flag=' -fno-builtin' |
| 2168 | fi |
| 2169 | fi |
| 2170 | |
| 2171 | # See if the linker supports building shared libraries. |
| 2172 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
| 2173 | |
| 2174 | allow_undefined_flag= |
| 2175 | no_undefined_flag= |
| 2176 | need_lib_prefix=unknown |
| 2177 | need_version=unknown |
| 2178 | # when you set need_version to no, make sure it does not cause -set_version |
| 2179 | # flags to be left without arguments |
| 2180 | archive_cmds= |
| 2181 | archive_expsym_cmds= |
| 2182 | old_archive_from_new_cmds= |
| 2183 | old_archive_from_expsyms_cmds= |
| 2184 | export_dynamic_flag_spec= |
| 2185 | whole_archive_flag_spec= |
| 2186 | thread_safe_flag_spec= |
| 2187 | hardcode_into_libs=no |
| 2188 | hardcode_libdir_flag_spec= |
| 2189 | hardcode_libdir_separator= |
| 2190 | hardcode_direct=no |
| 2191 | hardcode_minus_L=no |
| 2192 | hardcode_shlibpath_var=unsupported |
| 2193 | runpath_var= |
| 2194 | link_all_deplibs=unknown |
| 2195 | always_export_symbols=no |
| 2196 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 2197 | # include_expsyms should be a list of space-separated symbols to be *always* |
| 2198 | # included in the symbol list |
| 2199 | include_expsyms= |
| 2200 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
| 2201 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
| 2202 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
| 2203 | # as well as any symbol that contains `d'. |
| 2204 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
| 2205 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 2206 | # platforms (ab)use it in PIC code, but their linkers get confused if |
| 2207 | # the symbol is explicitly referenced. Since portable code cannot |
| 2208 | # rely on this symbol name, it's probably fine to never include it in |
| 2209 | # preloaded symbol tables. |
| 2210 | extract_expsyms_cmds= |
| 2211 | |
| 2212 | case $host_os in |
| 2213 | cygwin* | mingw* | pw32*) |
| 2214 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
| 2215 | # When not using gcc, we currently assume that we are using |
| 2216 | # Microsoft Visual C++. |
| 2217 | if test "$GCC" != yes; then |
| 2218 | with_gnu_ld=no |
| 2219 | fi |
| 2220 | ;; |
| 2221 | openbsd*) |
| 2222 | with_gnu_ld=no |
| 2223 | ;; |
| 2224 | esac |
| 2225 | |
| 2226 | ld_shlibs=yes |
| 2227 | if test "$with_gnu_ld" = yes; then |
| 2228 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 2229 | wlarc='${wl}' |
| 2230 | |
| 2231 | # See if GNU ld supports shared libraries. |
| 2232 | case $host_os in |
| 2233 | aix3* | aix4* | aix5*) |
| 2234 | # On AIX, the GNU linker is very broken |
| 2235 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
| 2236 | ld_shlibs=no |
| 2237 | cat <<EOF 1>&2 |
| 2238 | |
| 2239 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
| 2240 | *** to be unable to reliably create shared libraries on AIX. |
| 2241 | *** Therefore, libtool is disabling shared libraries support. If you |
| 2242 | *** really care for shared libraries, you may want to modify your PATH |
| 2243 | *** so that a non-GNU linker is found, and then restart. |
| 2244 | |
| 2245 | EOF |
| 2246 | ;; |
| 2247 | |
| 2248 | amigaos*) |
| 2249 | archive_cmds='$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)' |
| 2250 | hardcode_libdir_flag_spec='-L$libdir' |
| 2251 | hardcode_minus_L=yes |
| 2252 | |
| 2253 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
| 2254 | # that the semantics of dynamic libraries on AmigaOS, at least up |
| 2255 | # to version 4, is to share data among multiple programs linked |
| 2256 | # with the same dynamic library. Since this doesn't match the |
| 2257 | # behavior of shared libraries on other platforms, we can use |
| 2258 | # them. |
| 2259 | ld_shlibs=no |
| 2260 | ;; |
| 2261 | |
| 2262 | beos*) |
| 2263 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 2264 | allow_undefined_flag=unsupported |
| 2265 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 2266 | # support --undefined. This deserves some investigation. FIXME |
| 2267 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 2268 | else |
| 2269 | ld_shlibs=no |
| 2270 | fi |
| 2271 | ;; |
| 2272 | |
| 2273 | cygwin* | mingw* | pw32*) |
| 2274 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 2275 | # no search path for DLLs. |
| 2276 | hardcode_libdir_flag_spec='-L$libdir' |
| 2277 | allow_undefined_flag=unsupported |
| 2278 | always_export_symbols=yes |
| 2279 | |
| 2280 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
| 2281 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
| 2282 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
| 2283 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
| 2284 | else $CC -o impgen impgen.c ; fi)~ |
| 2285 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
| 2286 | |
| 2287 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
| 2288 | |
| 2289 | # cygwin and mingw dlls have different entry points and sets of symbols |
| 2290 | # to exclude. |
| 2291 | # FIXME: what about values for MSVC? |
| 2292 | dll_entry=__cygwin_dll_entry@12 |
| 2293 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
| 2294 | case $host_os in |
| 2295 | mingw*) |
| 2296 | # mingw values |
| 2297 | dll_entry=_DllMainCRTStartup@12 |
| 2298 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
| 2299 | ;; |
| 2300 | esac |
| 2301 | |
| 2302 | # mingw and cygwin differ, and it's simplest to just exclude the union |
| 2303 | # of the two symbol sets. |
| 2304 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
| 2305 | |
| 2306 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 2307 | # can override, but on older systems we have to supply one (in ltdll.c) |
| 2308 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
| 2309 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
| 2310 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
| 2311 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
| 2312 | else |
| 2313 | ltdll_obj= |
| 2314 | ltdll_cmds= |
| 2315 | fi |
| 2316 | |
| 2317 | # Extract the symbol export list from an `--export-all' def file, |
| 2318 | # then regenerate the def file from the symbol export list, so that |
| 2319 | # the compiled dll only exports the symbol export list. |
| 2320 | # Be careful not to strip the DATA tag left be newer dlltools. |
| 2321 | export_symbols_cmds="$ltdll_cmds"' |
| 2322 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
| 2323 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
| 2324 | |
| 2325 | # If the export-symbols file already is a .def file (1st line |
| 2326 | # is EXPORTS), use it as is. |
| 2327 | # If DATA tags from a recent dlltool are present, honour them! |
| 2328 | archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
| 2329 | cp $export_symbols $output_objdir/$soname-def; |
| 2330 | else |
| 2331 | echo EXPORTS > $output_objdir/$soname-def; |
| 2332 | _lt_hint=1; |
| 2333 | cat $export_symbols | while read symbol; do |
| 2334 | set dummy \$symbol; |
| 2335 | case \[$]# in |
| 2336 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
| 2337 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
| 2338 | esac; |
| 2339 | _lt_hint=`expr 1 + \$_lt_hint`; |
| 2340 | done; |
| 2341 | fi~ |
| 2342 | '"$ltdll_cmds"' |
| 2343 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 2344 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
| 2345 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 2346 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
| 2347 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
| 2348 | ;; |
| 2349 | |
| 2350 | netbsd*) |
| 2351 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 2352 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 2353 | wlarc= |
| 2354 | else |
| 2355 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 2356 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 2357 | fi |
| 2358 | ;; |
| 2359 | |
| 2360 | solaris* | sysv5*) |
| 2361 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
| 2362 | ld_shlibs=no |
| 2363 | cat <<EOF 1>&2 |
| 2364 | |
| 2365 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 2366 | *** create shared libraries on Solaris systems. Therefore, libtool |
| 2367 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 2368 | *** binutils to release 2.9.1 or newer. Another option is to modify |
| 2369 | *** your PATH or compiler configuration so that the native linker is |
| 2370 | *** used, and then restart. |
| 2371 | |
| 2372 | EOF |
| 2373 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 2374 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 2375 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 2376 | else |
| 2377 | ld_shlibs=no |
| 2378 | fi |
| 2379 | ;; |
| 2380 | |
| 2381 | sunos4*) |
| 2382 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 2383 | wlarc= |
| 2384 | hardcode_direct=yes |
| 2385 | hardcode_shlibpath_var=no |
| 2386 | ;; |
| 2387 | |
| 2388 | *) |
| 2389 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 2390 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 2391 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 2392 | else |
| 2393 | ld_shlibs=no |
| 2394 | fi |
| 2395 | ;; |
| 2396 | esac |
| 2397 | |
| 2398 | if test "$ld_shlibs" = yes; then |
| 2399 | runpath_var=LD_RUN_PATH |
| 2400 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
| 2401 | export_dynamic_flag_spec='${wl}--export-dynamic' |
| 2402 | case $host_os in |
| 2403 | cygwin* | mingw* | pw32*) |
| 2404 | # dlltool doesn't understand --whole-archive et. al. |
| 2405 | whole_archive_flag_spec= |
| 2406 | ;; |
| 2407 | *) |
| 2408 | # ancient GNU ld didn't support --whole-archive et. al. |
| 2409 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
| 2410 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 2411 | else |
| 2412 | whole_archive_flag_spec= |
| 2413 | fi |
| 2414 | ;; |
| 2415 | esac |
| 2416 | fi |
| 2417 | else |
| 2418 | # PORTME fill in a description of your system's linker (not GNU ld) |
| 2419 | case $host_os in |
| 2420 | aix3*) |
| 2421 | allow_undefined_flag=unsupported |
| 2422 | always_export_symbols=yes |
| 2423 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
| 2424 | # Note: this linker hardcodes the directories in LIBPATH if there |
| 2425 | # are no directories specified by -L. |
| 2426 | hardcode_minus_L=yes |
| 2427 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
| 2428 | # Neither direct hardcoding nor static linking is supported with a |
| 2429 | # broken collect2. |
| 2430 | hardcode_direct=unsupported |
| 2431 | fi |
| 2432 | ;; |
| 2433 | |
| 2434 | aix4* | aix5*) |
| 2435 | if test "$host_cpu" = ia64; then |
| 2436 | # On IA64, the linker does run time linking by default, so we don't |
| 2437 | # have to do anything special. |
| 2438 | aix_use_runtimelinking=no |
| 2439 | exp_sym_flag='-Bexport' |
| 2440 | no_entry_flag="" |
| 2441 | else |
| 2442 | aix_use_runtimelinking=no |
| 2443 | |
| 2444 | # Test if we are trying to use run time linking or normal |
| 2445 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 2446 | # need to do runtime linking. |
| 2447 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
| 2448 | for ld_flag in $LDFLAGS; do |
| 2449 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
| 2450 | aix_use_runtimelinking=yes |
| 2451 | break |
| 2452 | fi |
| 2453 | done |
| 2454 | esac |
| 2455 | |
| 2456 | exp_sym_flag='-bexport' |
| 2457 | no_entry_flag='-bnoentry' |
| 2458 | fi |
| 2459 | |
| 2460 | # When large executables or shared objects are built, AIX ld can |
| 2461 | # have problems creating the table of contents. If linking a library |
| 2462 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 2463 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 2464 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 2465 | |
| 2466 | hardcode_direct=yes |
| 2467 | archive_cmds='' |
| 2468 | hardcode_libdir_separator=':' |
| 2469 | if test "$GCC" = yes; then |
| 2470 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 2471 | collect2name=`${CC} -print-prog-name=collect2` |
| 2472 | if test -f "$collect2name" && \ |
| 2473 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 2474 | then |
| 2475 | # We have reworked collect2 |
| 2476 | hardcode_direct=yes |
| 2477 | else |
| 2478 | # We have old collect2 |
| 2479 | hardcode_direct=unsupported |
| 2480 | # It fails to find uninstalled libraries when the uninstalled |
| 2481 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 2482 | # to unsupported forces relinking |
| 2483 | hardcode_minus_L=yes |
| 2484 | hardcode_libdir_flag_spec='-L$libdir' |
| 2485 | hardcode_libdir_separator= |
| 2486 | fi |
| 2487 | esac |
| 2488 | |
| 2489 | shared_flag='-shared' |
| 2490 | else |
| 2491 | # not using gcc |
| 2492 | if test "$host_cpu" = ia64; then |
| 2493 | shared_flag='${wl}-G' |
| 2494 | else |
| 2495 | if test "$aix_use_runtimelinking" = yes; then |
| 2496 | shared_flag='${wl}-G' |
| 2497 | else |
| 2498 | shared_flag='${wl}-bM:SRE' |
| 2499 | fi |
| 2500 | fi |
| 2501 | fi |
| 2502 | |
| 2503 | # It seems that -bexpall can do strange things, so it is better to |
| 2504 | # generate a list of symbols to export. |
| 2505 | always_export_symbols=yes |
| 2506 | if test "$aix_use_runtimelinking" = yes; then |
| 2507 | # Warning - without using the other runtime loading flags (-brtl), |
| 2508 | # -berok will link without error, but may produce a broken library. |
| 2509 | allow_undefined_flag='-berok' |
| 2510 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 2511 | archive_expsym_cmds="\$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" |
| 2512 | else |
| 2513 | if test "$host_cpu" = ia64; then |
| 2514 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
| 2515 | allow_undefined_flag="-z nodefs" |
| 2516 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
| 2517 | else |
| 2518 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 2519 | # Warning - without using the other run time loading flags, |
| 2520 | # -berok will link without error, but may produce a broken library. |
| 2521 | allow_undefined_flag='${wl}-berok' |
| 2522 | # This is a bit strange, but is similar to how AIX traditionally builds |
| 2523 | # it's shared libraries. |
| 2524 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
| 2525 | fi |
| 2526 | fi |
| 2527 | ;; |
| 2528 | |
| 2529 | amigaos*) |
| 2530 | archive_cmds='$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)' |
| 2531 | hardcode_libdir_flag_spec='-L$libdir' |
| 2532 | hardcode_minus_L=yes |
| 2533 | # see comment about different semantics on the GNU ld section |
| 2534 | ld_shlibs=no |
| 2535 | ;; |
| 2536 | |
| 2537 | cygwin* | mingw* | pw32*) |
| 2538 | # When not using gcc, we currently assume that we are using |
| 2539 | # Microsoft Visual C++. |
| 2540 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 2541 | # no search path for DLLs. |
| 2542 | hardcode_libdir_flag_spec=' ' |
| 2543 | allow_undefined_flag=unsupported |
| 2544 | # Tell ltmain to make .lib files, not .a files. |
| 2545 | libext=lib |
| 2546 | # FIXME: Setting linknames here is a bad hack. |
| 2547 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 2548 | # The linker will automatically build a .lib file if we build a DLL. |
| 2549 | old_archive_from_new_cmds='true' |
| 2550 | # FIXME: Should let the user specify the lib program. |
| 2551 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
| 2552 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
| 2553 | ;; |
| 2554 | |
| 2555 | darwin* | rhapsody*) |
| 2556 | case "$host_os" in |
| 2557 | rhapsody* | darwin1.[[012]]) |
| 2558 | allow_undefined_flag='-undefined suppress' |
| 2559 | ;; |
| 2560 | *) # Darwin 1.3 on |
| 2561 | allow_undefined_flag='-flat_namespace -undefined suppress' |
| 2562 | ;; |
| 2563 | esac |
| 2564 | # FIXME: Relying on posixy $() will cause problems for |
| 2565 | # cross-compilation, but unfortunately the echo tests do not |
| 2566 | # yet detect zsh echo's removal of \ escapes. |
| 2567 | archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' |
| 2568 | # We need to add '_' to the symbols in $export_symbols first |
| 2569 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
| 2570 | hardcode_direct=yes |
| 2571 | hardcode_shlibpath_var=no |
| 2572 | whole_archive_flag_spec='-all_load $convenience' |
| 2573 | ;; |
| 2574 | |
| 2575 | freebsd1*) |
| 2576 | ld_shlibs=no |
| 2577 | ;; |
| 2578 | |
| 2579 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 2580 | # support. Future versions do this automatically, but an explicit c++rt0.o |
| 2581 | # does not break anything, and helps significantly (at the cost of a little |
| 2582 | # extra space). |
| 2583 | freebsd2.2*) |
| 2584 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 2585 | hardcode_libdir_flag_spec='-R$libdir' |
| 2586 | hardcode_direct=yes |
| 2587 | hardcode_shlibpath_var=no |
| 2588 | ;; |
| 2589 | |
| 2590 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 2591 | freebsd2*) |
| 2592 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 2593 | hardcode_direct=yes |
| 2594 | hardcode_minus_L=yes |
| 2595 | hardcode_shlibpath_var=no |
| 2596 | ;; |
| 2597 | |
| 2598 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 2599 | freebsd*) |
| 2600 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
| 2601 | hardcode_libdir_flag_spec='-R$libdir' |
| 2602 | hardcode_direct=yes |
| 2603 | hardcode_shlibpath_var=no |
| 2604 | ;; |
| 2605 | |
| 2606 | hpux9* | hpux10* | hpux11*) |
| 2607 | case $host_os in |
| 2608 | hpux9*) archive_cmds='$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' ;; |
| 2609 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
| 2610 | esac |
| 2611 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| 2612 | hardcode_libdir_separator=: |
| 2613 | hardcode_direct=yes |
| 2614 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
| 2615 | # location of the library. |
| 2616 | export_dynamic_flag_spec='${wl}-E' |
| 2617 | ;; |
| 2618 | |
| 2619 | irix5* | irix6*) |
| 2620 | if test "$GCC" = yes; then |
| 2621 | archive_cmds='$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' |
| 2622 | else |
| 2623 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 2624 | fi |
| 2625 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2626 | hardcode_libdir_separator=: |
| 2627 | link_all_deplibs=yes |
| 2628 | ;; |
| 2629 | |
| 2630 | netbsd*) |
| 2631 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 2632 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 2633 | else |
| 2634 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 2635 | fi |
| 2636 | hardcode_libdir_flag_spec='-R$libdir' |
| 2637 | hardcode_direct=yes |
| 2638 | hardcode_shlibpath_var=no |
| 2639 | ;; |
| 2640 | |
| 2641 | newsos6) |
| 2642 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2643 | hardcode_direct=yes |
| 2644 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2645 | hardcode_libdir_separator=: |
| 2646 | hardcode_shlibpath_var=no |
| 2647 | ;; |
| 2648 | |
| 2649 | openbsd*) |
| 2650 | hardcode_direct=yes |
| 2651 | hardcode_shlibpath_var=no |
| 2652 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 2653 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 2654 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 2655 | export_dynamic_flag_spec='${wl}-E' |
| 2656 | else |
| 2657 | case "$host_os" in |
| 2658 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
| 2659 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 2660 | hardcode_libdir_flag_spec='-R$libdir' |
| 2661 | ;; |
| 2662 | *) |
| 2663 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 2664 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 2665 | ;; |
| 2666 | esac |
| 2667 | fi |
| 2668 | ;; |
| 2669 | |
| 2670 | os2*) |
| 2671 | hardcode_libdir_flag_spec='-L$libdir' |
| 2672 | hardcode_minus_L=yes |
| 2673 | allow_undefined_flag=unsupported |
| 2674 | archive_cmds='$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' |
| 2675 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
| 2676 | ;; |
| 2677 | |
| 2678 | osf3*) |
| 2679 | if test "$GCC" = yes; then |
| 2680 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 2681 | archive_cmds='$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' |
| 2682 | else |
| 2683 | allow_undefined_flag=' -expect_unresolved \*' |
| 2684 | archive_cmds='$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' |
| 2685 | fi |
| 2686 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2687 | hardcode_libdir_separator=: |
| 2688 | ;; |
| 2689 | |
| 2690 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 2691 | if test "$GCC" = yes; then |
| 2692 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 2693 | archive_cmds='$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' |
| 2694 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 2695 | else |
| 2696 | allow_undefined_flag=' -expect_unresolved \*' |
| 2697 | archive_cmds='$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' |
| 2698 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
| 2699 | $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' |
| 2700 | |
| 2701 | #Both c and cxx compiler support -rpath directly |
| 2702 | hardcode_libdir_flag_spec='-rpath $libdir' |
| 2703 | fi |
| 2704 | hardcode_libdir_separator=: |
| 2705 | ;; |
| 2706 | |
| 2707 | sco3.2v5*) |
| 2708 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2709 | hardcode_shlibpath_var=no |
| 2710 | runpath_var=LD_RUN_PATH |
| 2711 | hardcode_runpath_var=yes |
| 2712 | export_dynamic_flag_spec='${wl}-Bexport' |
| 2713 | ;; |
| 2714 | |
| 2715 | solaris*) |
| 2716 | # gcc --version < 3.0 without binutils cannot create self contained |
| 2717 | # shared libraries reliably, requiring libgcc.a to resolve some of |
| 2718 | # the object symbols generated in some cases. Libraries that use |
| 2719 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
| 2720 | # a copy of libgcc.a into every shared library to guarantee resolving |
| 2721 | # such symbols causes other problems: According to Tim Van Holder |
| 2722 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
| 2723 | # (to the application) exception stack for one thing. |
| 2724 | no_undefined_flag=' -z defs' |
| 2725 | if test "$GCC" = yes; then |
| 2726 | case `$CC --version 2>/dev/null` in |
| 2727 | [[12]].*) |
| 2728 | cat <<EOF 1>&2 |
| 2729 | |
| 2730 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
| 2731 | *** create self contained shared libraries on Solaris systems, without |
| 2732 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
| 2733 | *** -no-undefined support, which will at least allow you to build shared |
| 2734 | *** libraries. However, you may find that when you link such libraries |
| 2735 | *** into an application without using GCC, you have to manually add |
| 2736 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
| 2737 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
| 2738 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
| 2739 | |
| 2740 | EOF |
| 2741 | no_undefined_flag= |
| 2742 | ;; |
| 2743 | esac |
| 2744 | fi |
| 2745 | # $CC -shared without GNU ld will not create a library from C++ |
| 2746 | # object files and a static libstdc++, better avoid it by now |
| 2747 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2748 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 2749 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 2750 | hardcode_libdir_flag_spec='-R$libdir' |
| 2751 | hardcode_shlibpath_var=no |
| 2752 | case $host_os in |
| 2753 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 2754 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 2755 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
| 2756 | esac |
| 2757 | link_all_deplibs=yes |
| 2758 | ;; |
| 2759 | |
| 2760 | sunos4*) |
| 2761 | if test "x$host_vendor" = xsequent; then |
| 2762 | # Use $CC to link under sequent, because it throws in some extra .o |
| 2763 | # files that make .init and .fini sections work. |
| 2764 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2765 | else |
| 2766 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 2767 | fi |
| 2768 | hardcode_libdir_flag_spec='-L$libdir' |
| 2769 | hardcode_direct=yes |
| 2770 | hardcode_minus_L=yes |
| 2771 | hardcode_shlibpath_var=no |
| 2772 | ;; |
| 2773 | |
| 2774 | sysv4) |
| 2775 | if test "x$host_vendor" = xsno; then |
| 2776 | archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2777 | hardcode_direct=yes # is this really true??? |
| 2778 | else |
| 2779 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2780 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
| 2781 | fi |
| 2782 | runpath_var='LD_RUN_PATH' |
| 2783 | hardcode_shlibpath_var=no |
| 2784 | ;; |
| 2785 | |
| 2786 | sysv4.3*) |
| 2787 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2788 | hardcode_shlibpath_var=no |
| 2789 | export_dynamic_flag_spec='-Bexport' |
| 2790 | ;; |
| 2791 | |
| 2792 | sysv5*) |
| 2793 | no_undefined_flag=' -z text' |
| 2794 | # $CC -shared without GNU ld will not create a library from C++ |
| 2795 | # object files and a static libstdc++, better avoid it by now |
| 2796 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2797 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 2798 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 2799 | hardcode_libdir_flag_spec= |
| 2800 | hardcode_shlibpath_var=no |
| 2801 | runpath_var='LD_RUN_PATH' |
| 2802 | ;; |
| 2803 | |
| 2804 | uts4*) |
| 2805 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2806 | hardcode_libdir_flag_spec='-L$libdir' |
| 2807 | hardcode_shlibpath_var=no |
| 2808 | ;; |
| 2809 | |
| 2810 | dgux*) |
| 2811 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2812 | hardcode_libdir_flag_spec='-L$libdir' |
| 2813 | hardcode_shlibpath_var=no |
| 2814 | ;; |
| 2815 | |
| 2816 | sysv4*MP*) |
| 2817 | if test -d /usr/nec; then |
| 2818 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 2819 | hardcode_shlibpath_var=no |
| 2820 | runpath_var=LD_RUN_PATH |
| 2821 | hardcode_runpath_var=yes |
| 2822 | ld_shlibs=yes |
| 2823 | fi |
| 2824 | ;; |
| 2825 | |
| 2826 | sysv4.2uw2*) |
| 2827 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 2828 | hardcode_direct=yes |
| 2829 | hardcode_minus_L=no |
| 2830 | hardcode_shlibpath_var=no |
| 2831 | hardcode_runpath_var=yes |
| 2832 | runpath_var=LD_RUN_PATH |
| 2833 | ;; |
| 2834 | |
| 2835 | sysv5uw7* | unixware7*) |
| 2836 | no_undefined_flag='${wl}-z ${wl}text' |
| 2837 | if test "$GCC" = yes; then |
| 2838 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2839 | else |
| 2840 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 2841 | fi |
| 2842 | runpath_var='LD_RUN_PATH' |
| 2843 | hardcode_shlibpath_var=no |
| 2844 | ;; |
| 2845 | |
| 2846 | *) |
| 2847 | ld_shlibs=no |
| 2848 | ;; |
| 2849 | esac |
| 2850 | fi |
| 2851 | AC_MSG_RESULT([$ld_shlibs]) |
| 2852 | test "$ld_shlibs" = no && can_build_shared=no |
| 2853 | |
| 2854 | # Check hardcoding attributes. |
| 2855 | AC_MSG_CHECKING([how to hardcode library paths into programs]) |
| 2856 | hardcode_action= |
| 2857 | if test -n "$hardcode_libdir_flag_spec" || \ |
| 2858 | test -n "$runpath_var"; then |
| 2859 | |
| 2860 | # We can hardcode non-existant directories. |
| 2861 | if test "$hardcode_direct" != no && |
| 2862 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
| 2863 | # have to relink, otherwise we might link with an installed library |
| 2864 | # when we should be linking with a yet-to-be-installed one |
| 2865 | ## test "$hardcode_shlibpath_var" != no && |
| 2866 | test "$hardcode_minus_L" != no; then |
| 2867 | # Linking always hardcodes the temporary library directory. |
| 2868 | hardcode_action=relink |
| 2869 | else |
| 2870 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
| 2871 | hardcode_action=immediate |
| 2872 | fi |
| 2873 | else |
| 2874 | # We cannot hardcode anything, or else we can only hardcode existing |
| 2875 | # directories. |
| 2876 | hardcode_action=unsupported |
| 2877 | fi |
| 2878 | AC_MSG_RESULT([$hardcode_action]) |
| 2879 | |
| 2880 | striplib= |
| 2881 | old_striplib= |
| 2882 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
| 2883 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
| 2884 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
| 2885 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
| 2886 | AC_MSG_RESULT([yes]) |
| 2887 | else |
| 2888 | AC_MSG_RESULT([no]) |
| 2889 | fi |
| 2890 | |
| 2891 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 2892 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
| 2893 | |
| 2894 | # PORTME Fill in your ld.so characteristics |
| 2895 | AC_MSG_CHECKING([dynamic linker characteristics]) |
| 2896 | library_names_spec= |
| 2897 | libname_spec='lib$name' |
| 2898 | soname_spec= |
| 2899 | postinstall_cmds= |
| 2900 | postuninstall_cmds= |
| 2901 | finish_cmds= |
| 2902 | finish_eval= |
| 2903 | shlibpath_var= |
| 2904 | shlibpath_overrides_runpath=unknown |
| 2905 | version_type=none |
| 2906 | dynamic_linker="$host_os ld.so" |
| 2907 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
| 2908 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 2909 | |
| 2910 | case $host_os in |
| 2911 | aix3*) |
| 2912 | version_type=linux |
| 2913 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
| 2914 | shlibpath_var=LIBPATH |
| 2915 | |
| 2916 | # AIX has no versioning support, so we append a major version to the name. |
| 2917 | soname_spec='${libname}${release}.so$major' |
| 2918 | ;; |
| 2919 | |
| 2920 | aix4* | aix5*) |
| 2921 | version_type=linux |
| 2922 | if test "$host_cpu" = ia64; then |
| 2923 | # AIX 5 supports IA64 |
| 2924 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
| 2925 | shlibpath_var=LD_LIBRARY_PATH |
| 2926 | else |
| 2927 | # With GCC up to 2.95.x, collect2 would create an import file |
| 2928 | # for dependence libraries. The import file would start with |
| 2929 | # the line `#! .'. This would cause the generated library to |
| 2930 | # depend on `.', always an invalid library. This was fixed in |
| 2931 | # development snapshots of GCC prior to 3.0. |
| 2932 | case $host_os in |
| 2933 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
| 2934 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
| 2935 | echo ' yes ' |
| 2936 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
| 2937 | : |
| 2938 | else |
| 2939 | can_build_shared=no |
| 2940 | fi |
| 2941 | ;; |
| 2942 | esac |
| 2943 | # AIX (on Power*) has no versioning support, so currently we can |
| 2944 | # not hardcode correct soname into executable. Probably we can |
| 2945 | # add versioning support to collect2, so additional links can |
| 2946 | # be useful in future. |
| 2947 | if test "$aix_use_runtimelinking" = yes; then |
| 2948 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
| 2949 | # instead of lib<name>.a to let people know that these are not |
| 2950 | # typical AIX shared libraries. |
| 2951 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2952 | else |
| 2953 | # We preserve .a as extension for shared libraries through AIX4.2 |
| 2954 | # and later when we are not doing run time linking. |
| 2955 | library_names_spec='${libname}${release}.a $libname.a' |
| 2956 | soname_spec='${libname}${release}.so$major' |
| 2957 | fi |
| 2958 | shlibpath_var=LIBPATH |
| 2959 | fi |
| 2960 | ;; |
| 2961 | |
| 2962 | amigaos*) |
| 2963 | library_names_spec='$libname.ixlibrary $libname.a' |
| 2964 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
| 2965 | 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' |
| 2966 | ;; |
| 2967 | |
| 2968 | beos*) |
| 2969 | library_names_spec='${libname}.so' |
| 2970 | dynamic_linker="$host_os ld.so" |
| 2971 | shlibpath_var=LIBRARY_PATH |
| 2972 | ;; |
| 2973 | |
| 2974 | bsdi4*) |
| 2975 | version_type=linux |
| 2976 | need_version=no |
| 2977 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2978 | soname_spec='${libname}${release}.so$major' |
| 2979 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
| 2980 | shlibpath_var=LD_LIBRARY_PATH |
| 2981 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
| 2982 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
| 2983 | export_dynamic_flag_spec=-rdynamic |
| 2984 | # the default ld.so.conf also contains /usr/contrib/lib and |
| 2985 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
| 2986 | # libtool to hard-code these into programs |
| 2987 | ;; |
| 2988 | |
| 2989 | cygwin* | mingw* | pw32*) |
| 2990 | version_type=windows |
| 2991 | need_version=no |
| 2992 | need_lib_prefix=no |
| 2993 | case $GCC,$host_os in |
| 2994 | yes,cygwin*) |
| 2995 | library_names_spec='$libname.dll.a' |
| 2996 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 2997 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
| 2998 | dldir=$destdir/`dirname \$dlpath`~ |
| 2999 | test -d \$dldir || mkdir -p \$dldir~ |
| 3000 | $install_prog .libs/$dlname \$dldir/$dlname' |
| 3001 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 3002 | dlpath=$dir/\$dldll~ |
| 3003 | $rm \$dlpath' |
| 3004 | ;; |
| 3005 | yes,mingw*) |
| 3006 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 3007 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` |
| 3008 | ;; |
| 3009 | yes,pw32*) |
| 3010 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
| 3011 | ;; |
| 3012 | *) |
| 3013 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
| 3014 | ;; |
| 3015 | esac |
| 3016 | dynamic_linker='Win32 ld.exe' |
| 3017 | # FIXME: first we should search . and the directory the executable is in |
| 3018 | shlibpath_var=PATH |
| 3019 | ;; |
| 3020 | |
| 3021 | darwin* | rhapsody*) |
| 3022 | dynamic_linker="$host_os dyld" |
| 3023 | version_type=darwin |
| 3024 | need_lib_prefix=no |
| 3025 | need_version=no |
| 3026 | # FIXME: Relying on posixy $() will cause problems for |
| 3027 | # cross-compilation, but unfortunately the echo tests do not |
| 3028 | # yet detect zsh echo's removal of \ escapes. |
| 3029 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
| 3030 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
| 3031 | shlibpath_overrides_runpath=yes |
| 3032 | shlibpath_var=DYLD_LIBRARY_PATH |
| 3033 | ;; |
| 3034 | |
| 3035 | freebsd1*) |
| 3036 | dynamic_linker=no |
| 3037 | ;; |
| 3038 | |
| 3039 | freebsd*) |
| 3040 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
| 3041 | version_type=freebsd-$objformat |
| 3042 | case $version_type in |
| 3043 | freebsd-elf*) |
| 3044 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 3045 | need_version=no |
| 3046 | need_lib_prefix=no |
| 3047 | ;; |
| 3048 | freebsd-*) |
| 3049 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
| 3050 | need_version=yes |
| 3051 | ;; |
| 3052 | esac |
| 3053 | shlibpath_var=LD_LIBRARY_PATH |
| 3054 | case $host_os in |
| 3055 | freebsd2*) |
| 3056 | shlibpath_overrides_runpath=yes |
| 3057 | ;; |
| 3058 | *) |
| 3059 | shlibpath_overrides_runpath=no |
| 3060 | hardcode_into_libs=yes |
| 3061 | ;; |
| 3062 | esac |
| 3063 | ;; |
| 3064 | |
| 3065 | gnu*) |
| 3066 | version_type=linux |
| 3067 | need_lib_prefix=no |
| 3068 | need_version=no |
| 3069 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
| 3070 | soname_spec='${libname}${release}.so$major' |
| 3071 | shlibpath_var=LD_LIBRARY_PATH |
| 3072 | hardcode_into_libs=yes |
| 3073 | ;; |
| 3074 | |
| 3075 | hpux9* | hpux10* | hpux11*) |
| 3076 | # Give a soname corresponding to the major version so that dld.sl refuses to |
| 3077 | # link against other versions. |
| 3078 | dynamic_linker="$host_os dld.sl" |
| 3079 | version_type=sunos |
| 3080 | need_lib_prefix=no |
| 3081 | need_version=no |
| 3082 | shlibpath_var=SHLIB_PATH |
| 3083 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
| 3084 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
| 3085 | soname_spec='${libname}${release}.sl$major' |
| 3086 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
| 3087 | postinstall_cmds='chmod 555 $lib' |
| 3088 | ;; |
| 3089 | |
| 3090 | irix5* | irix6*) |
| 3091 | version_type=irix |
| 3092 | need_lib_prefix=no |
| 3093 | need_version=no |
| 3094 | soname_spec='${libname}${release}.so$major' |
| 3095 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
| 3096 | case $host_os in |
| 3097 | irix5*) |
| 3098 | libsuff= shlibsuff= |
| 3099 | ;; |
| 3100 | *) |
| 3101 | case $LD in # libtool.m4 will add one of these switches to LD |
| 3102 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
| 3103 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
| 3104 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
| 3105 | *) libsuff= shlibsuff= libmagic=never-match;; |
| 3106 | esac |
| 3107 | ;; |
| 3108 | esac |
| 3109 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
| 3110 | shlibpath_overrides_runpath=no |
| 3111 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
| 3112 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
| 3113 | ;; |
| 3114 | |
| 3115 | # No shared lib support for Linux oldld, aout, or coff. |
| 3116 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
| 3117 | dynamic_linker=no |
| 3118 | ;; |
| 3119 | |
| 3120 | # This must be Linux ELF. |
| 3121 | linux-gnu*) |
| 3122 | version_type=linux |
| 3123 | need_lib_prefix=no |
| 3124 | need_version=no |
| 3125 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3126 | soname_spec='${libname}${release}.so$major' |
| 3127 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
| 3128 | shlibpath_var=LD_LIBRARY_PATH |
| 3129 | shlibpath_overrides_runpath=no |
| 3130 | # This implies no fast_install, which is unacceptable. |
| 3131 | # Some rework will be needed to allow for fast_install |
| 3132 | # before this can be enabled. |
| 3133 | hardcode_into_libs=yes |
| 3134 | |
| 3135 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
| 3136 | # powerpc, because MkLinux only supported shared libraries with the |
| 3137 | # GNU dynamic linker. Since this was broken with cross compilers, |
| 3138 | # most powerpc-linux boxes support dynamic linking these days and |
| 3139 | # people can always --disable-shared, the test was removed, and we |
| 3140 | # assume the GNU/Linux dynamic linker is in use. |
| 3141 | dynamic_linker='GNU/Linux ld.so' |
| 3142 | ;; |
| 3143 | |
| 3144 | netbsd*) |
| 3145 | version_type=sunos |
| 3146 | need_lib_prefix=no |
| 3147 | need_version=no |
| 3148 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 3149 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 3150 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 3151 | dynamic_linker='NetBSD (a.out) ld.so' |
| 3152 | else |
| 3153 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
| 3154 | soname_spec='${libname}${release}.so$major' |
| 3155 | dynamic_linker='NetBSD ld.elf_so' |
| 3156 | fi |
| 3157 | shlibpath_var=LD_LIBRARY_PATH |
| 3158 | shlibpath_overrides_runpath=yes |
| 3159 | hardcode_into_libs=yes |
| 3160 | ;; |
| 3161 | |
| 3162 | newsos6) |
| 3163 | version_type=linux |
| 3164 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3165 | shlibpath_var=LD_LIBRARY_PATH |
| 3166 | shlibpath_overrides_runpath=yes |
| 3167 | ;; |
| 3168 | |
| 3169 | openbsd*) |
| 3170 | version_type=sunos |
| 3171 | need_lib_prefix=no |
| 3172 | need_version=no |
| 3173 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 3174 | case "$host_os" in |
| 3175 | openbsd2.[[89]] | openbsd2.[[89]].*) |
| 3176 | shlibpath_overrides_runpath=no |
| 3177 | ;; |
| 3178 | *) |
| 3179 | shlibpath_overrides_runpath=yes |
| 3180 | ;; |
| 3181 | esac |
| 3182 | else |
| 3183 | shlibpath_overrides_runpath=yes |
| 3184 | fi |
| 3185 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 3186 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 3187 | shlibpath_var=LD_LIBRARY_PATH |
| 3188 | ;; |
| 3189 | |
| 3190 | os2*) |
| 3191 | libname_spec='$name' |
| 3192 | need_lib_prefix=no |
| 3193 | library_names_spec='$libname.dll $libname.a' |
| 3194 | dynamic_linker='OS/2 ld.exe' |
| 3195 | shlibpath_var=LIBPATH |
| 3196 | ;; |
| 3197 | |
| 3198 | osf3* | osf4* | osf5*) |
| 3199 | version_type=osf |
| 3200 | need_version=no |
| 3201 | soname_spec='${libname}${release}.so' |
| 3202 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 3203 | shlibpath_var=LD_LIBRARY_PATH |
| 3204 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
| 3205 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
| 3206 | ;; |
| 3207 | |
| 3208 | sco3.2v5*) |
| 3209 | version_type=osf |
| 3210 | soname_spec='${libname}${release}.so$major' |
| 3211 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3212 | shlibpath_var=LD_LIBRARY_PATH |
| 3213 | ;; |
| 3214 | |
| 3215 | solaris*) |
| 3216 | version_type=linux |
| 3217 | need_lib_prefix=no |
| 3218 | need_version=no |
| 3219 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3220 | soname_spec='${libname}${release}.so$major' |
| 3221 | shlibpath_var=LD_LIBRARY_PATH |
| 3222 | shlibpath_overrides_runpath=yes |
| 3223 | hardcode_into_libs=yes |
| 3224 | # ldd complains unless libraries are executable |
| 3225 | postinstall_cmds='chmod +x $lib' |
| 3226 | ;; |
| 3227 | |
| 3228 | sunos4*) |
| 3229 | version_type=sunos |
| 3230 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 3231 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
| 3232 | shlibpath_var=LD_LIBRARY_PATH |
| 3233 | shlibpath_overrides_runpath=yes |
| 3234 | if test "$with_gnu_ld" = yes; then |
| 3235 | need_lib_prefix=no |
| 3236 | fi |
| 3237 | need_version=yes |
| 3238 | ;; |
| 3239 | |
| 3240 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 3241 | version_type=linux |
| 3242 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3243 | soname_spec='${libname}${release}.so$major' |
| 3244 | shlibpath_var=LD_LIBRARY_PATH |
| 3245 | case $host_vendor in |
| 3246 | sni) |
| 3247 | shlibpath_overrides_runpath=no |
| 3248 | ;; |
| 3249 | motorola) |
| 3250 | need_lib_prefix=no |
| 3251 | need_version=no |
| 3252 | shlibpath_overrides_runpath=no |
| 3253 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
| 3254 | ;; |
| 3255 | esac |
| 3256 | ;; |
| 3257 | |
| 3258 | uts4*) |
| 3259 | version_type=linux |
| 3260 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3261 | soname_spec='${libname}${release}.so$major' |
| 3262 | shlibpath_var=LD_LIBRARY_PATH |
| 3263 | ;; |
| 3264 | |
| 3265 | dgux*) |
| 3266 | version_type=linux |
| 3267 | need_lib_prefix=no |
| 3268 | need_version=no |
| 3269 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 3270 | soname_spec='${libname}${release}.so$major' |
| 3271 | shlibpath_var=LD_LIBRARY_PATH |
| 3272 | ;; |
| 3273 | |
| 3274 | sysv4*MP*) |
| 3275 | if test -d /usr/nec ;then |
| 3276 | version_type=linux |
| 3277 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
| 3278 | soname_spec='$libname.so.$major' |
| 3279 | shlibpath_var=LD_LIBRARY_PATH |
| 3280 | fi |
| 3281 | ;; |
| 3282 | |
| 3283 | *) |
| 3284 | dynamic_linker=no |
| 3285 | ;; |
| 3286 | esac |
| 3287 | AC_MSG_RESULT([$dynamic_linker]) |
| 3288 | test "$dynamic_linker" = no && can_build_shared=no |
| 3289 | |
| 3290 | # Report the final consequences. |
| 3291 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 3292 | AC_MSG_RESULT([$can_build_shared]) |
| 3293 | |
| 3294 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 3295 | test "$can_build_shared" = "no" && enable_shared=no |
| 3296 | |
| 3297 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 3298 | # are all built from PIC. |
| 3299 | case "$host_os" in |
| 3300 | aix3*) |
| 3301 | test "$enable_shared" = yes && enable_static=no |
| 3302 | if test -n "$RANLIB"; then |
| 3303 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 3304 | postinstall_cmds='$RANLIB $lib' |
| 3305 | fi |
| 3306 | ;; |
| 3307 | |
| 3308 | aix4*) |
| 3309 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
| 3310 | test "$enable_shared" = yes && enable_static=no |
| 3311 | fi |
| 3312 | ;; |
| 3313 | esac |
| 3314 | AC_MSG_RESULT([$enable_shared]) |
| 3315 | |
| 3316 | AC_MSG_CHECKING([whether to build static libraries]) |
| 3317 | # Make sure either enable_shared or enable_static is yes. |
| 3318 | test "$enable_shared" = yes || enable_static=yes |
| 3319 | AC_MSG_RESULT([$enable_static]) |
| 3320 | |
| 3321 | if test "$hardcode_action" = relink; then |
| 3322 | # Fast installation is not supported |
| 3323 | enable_fast_install=no |
| 3324 | elif test "$shlibpath_overrides_runpath" = yes || |
| 3325 | test "$enable_shared" = no; then |
| 3326 | # Fast installation is not necessary |
| 3327 | enable_fast_install=needless |
| 3328 | fi |
| 3329 | |
| 3330 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
| 3331 | if test "$GCC" = yes; then |
| 3332 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
| 3333 | fi |
| 3334 | |
| 3335 | AC_LIBTOOL_DLOPEN_SELF |
| 3336 | |
| 3337 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
| 3338 | case $archive_cmds in |
| 3339 | *'~'*) |
| 3340 | # FIXME: we may have to deal with multi-command sequences. |
| 3341 | ;; |
| 3342 | '$CC '*) |
| 3343 | # Test whether the compiler implicitly links with -lc since on some |
| 3344 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
| 3345 | # to ld, don't add -lc before -lgcc. |
| 3346 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
| 3347 | AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
| 3348 | [$rm conftest* |
| 3349 | echo 'static int dummy;' > conftest.$ac_ext |
| 3350 | |
| 3351 | if AC_TRY_EVAL(ac_compile); then |
| 3352 | soname=conftest |
| 3353 | lib=conftest |
| 3354 | libobjs=conftest.$ac_objext |
| 3355 | deplibs= |
| 3356 | wl=$lt_cv_prog_cc_wl |
| 3357 | compiler_flags=-v |
| 3358 | linker_flags=-v |
| 3359 | verstring= |
| 3360 | output_objdir=. |
| 3361 | libname=conftest |
| 3362 | save_allow_undefined_flag=$allow_undefined_flag |
| 3363 | allow_undefined_flag= |
| 3364 | if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
| 3365 | then |
| 3366 | lt_cv_archive_cmds_need_lc=no |
| 3367 | else |
| 3368 | lt_cv_archive_cmds_need_lc=yes |
| 3369 | fi |
| 3370 | allow_undefined_flag=$save_allow_undefined_flag |
| 3371 | else |
| 3372 | cat conftest.err 1>&5 |
| 3373 | fi]) |
| 3374 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
| 3375 | ;; |
| 3376 | esac |
| 3377 | fi |
| 3378 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
| 3379 | |
| 3380 | # The second clause should only fire when bootstrapping the |
| 3381 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
| 3382 | # with your package, and you will get complaints that there are |
| 3383 | # no rules to generate ltmain.sh. |
| 3384 | if test -f "$ltmain"; then |
| 3385 | : |
| 3386 | else |
| 3387 | # If there is no Makefile yet, we rely on a make rule to execute |
| 3388 | # `config.status --recheck' to rerun these tests and create the |
| 3389 | # libtool script then. |
| 3390 | test -f Makefile && make "$ltmain" |
| 3391 | fi |
| 3392 | |
| 3393 | if test -f "$ltmain"; then |
| 3394 | trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
| 3395 | $rm -f "${ofile}T" |
| 3396 | |
| 3397 | echo creating $ofile |
| 3398 | |
| 3399 | # Now quote all the things that may contain metacharacters while being |
| 3400 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
| 3401 | # variables and quote the copies for generation of the libtool script. |
| 3402 | for var in echo old_CC old_CFLAGS \ |
| 3403 | AR AR_FLAGS CC LD LN_S NM SHELL \ |
| 3404 | reload_flag reload_cmds wl \ |
| 3405 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
| 3406 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
| 3407 | library_names_spec soname_spec \ |
| 3408 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
| 3409 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
| 3410 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
| 3411 | old_striplib striplib file_magic_cmd export_symbols_cmds \ |
| 3412 | deplibs_check_method allow_undefined_flag no_undefined_flag \ |
| 3413 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
| 3414 | global_symbol_to_c_name_address \ |
| 3415 | hardcode_libdir_flag_spec hardcode_libdir_separator \ |
| 3416 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
| 3417 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
| 3418 | |
| 3419 | case $var in |
| 3420 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
| 3421 | old_postinstall_cmds | old_postuninstall_cmds | \ |
| 3422 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
| 3423 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
| 3424 | postinstall_cmds | postuninstall_cmds | \ |
| 3425 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
| 3426 | # Double-quote double-evaled strings. |
| 3427 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
| 3428 | ;; |
| 3429 | *) |
| 3430 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
| 3431 | ;; |
| 3432 | esac |
| 3433 | done |
| 3434 | |
| 3435 | cat <<__EOF__ > "${ofile}T" |
| 3436 | #! $SHELL |
| 3437 | |
| 3438 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
| 3439 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
| 3440 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
| 3441 | # |
| 3442 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. |
| 3443 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
| 3444 | # |
| 3445 | # This program is free software; you can redistribute it and/or modify |
| 3446 | # it under the terms of the GNU General Public License as published by |
| 3447 | # the Free Software Foundation; either version 2 of the License, or |
| 3448 | # (at your option) any later version. |
| 3449 | # |
| 3450 | # This program is distributed in the hope that it will be useful, but |
| 3451 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3452 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 3453 | # General Public License for more details. |
| 3454 | # |
| 3455 | # You should have received a copy of the GNU General Public License |
| 3456 | # along with this program; if not, write to the Free Software |
| 3457 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 3458 | # |
| 3459 | # As a special exception to the GNU General Public License, if you |
| 3460 | # distribute this file as part of a program that contains a |
| 3461 | # configuration script generated by Autoconf, you may include it under |
| 3462 | # the same distribution terms that you use for the rest of that program. |
| 3463 | |
| 3464 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
| 3465 | Xsed="sed -e s/^X//" |
| 3466 | |
| 3467 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 3468 | # if CDPATH is set. |
| 3469 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 3470 | |
| 3471 | # ### BEGIN LIBTOOL CONFIG |
| 3472 | |
| 3473 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 3474 | |
| 3475 | # Shell to use when invoking shell scripts. |
| 3476 | SHELL=$lt_SHELL |
| 3477 | |
| 3478 | # Whether or not to build shared libraries. |
| 3479 | build_libtool_libs=$enable_shared |
| 3480 | |
| 3481 | # Whether or not to build static libraries. |
| 3482 | build_old_libs=$enable_static |
| 3483 | |
| 3484 | # Whether or not to add -lc for building shared libraries. |
| 3485 | build_libtool_need_lc=$need_lc |
| 3486 | |
| 3487 | # Whether or not to optimize for fast installation. |
| 3488 | fast_install=$enable_fast_install |
| 3489 | |
| 3490 | # The host system. |
| 3491 | host_alias=$host_alias |
| 3492 | host=$host |
| 3493 | |
| 3494 | # An echo program that does not interpret backslashes. |
| 3495 | echo=$lt_echo |
| 3496 | |
| 3497 | # The archiver. |
| 3498 | AR=$lt_AR |
| 3499 | AR_FLAGS=$lt_AR_FLAGS |
| 3500 | |
| 3501 | # The default C compiler. |
| 3502 | CC=$lt_CC |
| 3503 | |
| 3504 | # Is the compiler the GNU C compiler? |
| 3505 | with_gcc=$GCC |
| 3506 | |
| 3507 | # The linker used to build libraries. |
| 3508 | LD=$lt_LD |
| 3509 | |
| 3510 | # Whether we need hard or soft links. |
| 3511 | LN_S=$lt_LN_S |
| 3512 | |
| 3513 | # A BSD-compatible nm program. |
| 3514 | NM=$lt_NM |
| 3515 | |
| 3516 | # A symbol stripping program |
| 3517 | STRIP=$STRIP |
| 3518 | |
| 3519 | # Used to examine libraries when file_magic_cmd begins "file" |
| 3520 | MAGIC_CMD=$MAGIC_CMD |
| 3521 | |
| 3522 | # Used on cygwin: DLL creation program. |
| 3523 | DLLTOOL="$DLLTOOL" |
| 3524 | |
| 3525 | # Used on cygwin: object dumper. |
| 3526 | OBJDUMP="$OBJDUMP" |
| 3527 | |
| 3528 | # Used on cygwin: assembler. |
| 3529 | AS="$AS" |
| 3530 | |
| 3531 | # The name of the directory that contains temporary libtool files. |
| 3532 | objdir=$objdir |
| 3533 | |
| 3534 | # How to create reloadable object files. |
| 3535 | reload_flag=$lt_reload_flag |
| 3536 | reload_cmds=$lt_reload_cmds |
| 3537 | |
| 3538 | # How to pass a linker flag through the compiler. |
| 3539 | wl=$lt_wl |
| 3540 | |
| 3541 | # Object file suffix (normally "o"). |
| 3542 | objext="$ac_objext" |
| 3543 | |
| 3544 | # Old archive suffix (normally "a"). |
| 3545 | libext="$libext" |
| 3546 | |
| 3547 | # Executable file suffix (normally ""). |
| 3548 | exeext="$exeext" |
| 3549 | |
| 3550 | # Additional compiler flags for building library objects. |
| 3551 | pic_flag=$lt_pic_flag |
| 3552 | pic_mode=$pic_mode |
| 3553 | |
| 3554 | # Does compiler simultaneously support -c and -o options? |
| 3555 | compiler_c_o=$lt_compiler_c_o |
| 3556 | |
| 3557 | # Can we write directly to a .lo ? |
| 3558 | compiler_o_lo=$lt_compiler_o_lo |
| 3559 | |
| 3560 | # Must we lock files when doing compilation ? |
| 3561 | need_locks=$lt_need_locks |
| 3562 | |
| 3563 | # Do we need the lib prefix for modules? |
| 3564 | need_lib_prefix=$need_lib_prefix |
| 3565 | |
| 3566 | # Do we need a version for libraries? |
| 3567 | need_version=$need_version |
| 3568 | |
| 3569 | # Whether dlopen is supported. |
| 3570 | dlopen_support=$enable_dlopen |
| 3571 | |
| 3572 | # Whether dlopen of programs is supported. |
| 3573 | dlopen_self=$enable_dlopen_self |
| 3574 | |
| 3575 | # Whether dlopen of statically linked programs is supported. |
| 3576 | dlopen_self_static=$enable_dlopen_self_static |
| 3577 | |
| 3578 | # Compiler flag to prevent dynamic linking. |
| 3579 | link_static_flag=$lt_link_static_flag |
| 3580 | |
| 3581 | # Compiler flag to turn off builtin functions. |
| 3582 | no_builtin_flag=$lt_no_builtin_flag |
| 3583 | |
| 3584 | # Compiler flag to allow reflexive dlopens. |
| 3585 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
| 3586 | |
| 3587 | # Compiler flag to generate shared objects directly from archives. |
| 3588 | whole_archive_flag_spec=$lt_whole_archive_flag_spec |
| 3589 | |
| 3590 | # Compiler flag to generate thread-safe objects. |
| 3591 | thread_safe_flag_spec=$lt_thread_safe_flag_spec |
| 3592 | |
| 3593 | # Library versioning type. |
| 3594 | version_type=$version_type |
| 3595 | |
| 3596 | # Format of library name prefix. |
| 3597 | libname_spec=$lt_libname_spec |
| 3598 | |
| 3599 | # List of archive names. First name is the real one, the rest are links. |
| 3600 | # The last name is the one that the linker finds with -lNAME. |
| 3601 | library_names_spec=$lt_library_names_spec |
| 3602 | |
| 3603 | # The coded name of the library, if different from the real name. |
| 3604 | soname_spec=$lt_soname_spec |
| 3605 | |
| 3606 | # Commands used to build and install an old-style archive. |
| 3607 | RANLIB=$lt_RANLIB |
| 3608 | old_archive_cmds=$lt_old_archive_cmds |
| 3609 | old_postinstall_cmds=$lt_old_postinstall_cmds |
| 3610 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
| 3611 | |
| 3612 | # Create an old-style archive from a shared archive. |
| 3613 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
| 3614 | |
| 3615 | # Create a temporary old-style archive to link instead of a shared archive. |
| 3616 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
| 3617 | |
| 3618 | # Commands used to build and install a shared archive. |
| 3619 | archive_cmds=$lt_archive_cmds |
| 3620 | archive_expsym_cmds=$lt_archive_expsym_cmds |
| 3621 | postinstall_cmds=$lt_postinstall_cmds |
| 3622 | postuninstall_cmds=$lt_postuninstall_cmds |
| 3623 | |
| 3624 | # Commands to strip libraries. |
| 3625 | old_striplib=$lt_old_striplib |
| 3626 | striplib=$lt_striplib |
| 3627 | |
| 3628 | # Method to check whether dependent libraries are shared objects. |
| 3629 | deplibs_check_method=$lt_deplibs_check_method |
| 3630 | |
| 3631 | # Command to use when deplibs_check_method == file_magic. |
| 3632 | file_magic_cmd=$lt_file_magic_cmd |
| 3633 | |
| 3634 | # Flag that allows shared libraries with undefined symbols to be built. |
| 3635 | allow_undefined_flag=$lt_allow_undefined_flag |
| 3636 | |
| 3637 | # Flag that forces no undefined symbols. |
| 3638 | no_undefined_flag=$lt_no_undefined_flag |
| 3639 | |
| 3640 | # Commands used to finish a libtool library installation in a directory. |
| 3641 | finish_cmds=$lt_finish_cmds |
| 3642 | |
| 3643 | # Same as above, but a single script fragment to be evaled but not shown. |
| 3644 | finish_eval=$lt_finish_eval |
| 3645 | |
| 3646 | # Take the output of nm and produce a listing of raw symbols and C names. |
| 3647 | global_symbol_pipe=$lt_global_symbol_pipe |
| 3648 | |
| 3649 | # Transform the output of nm in a proper C declaration |
| 3650 | global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
| 3651 | |
| 3652 | # Transform the output of nm in a C name address pair |
| 3653 | global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
| 3654 | |
| 3655 | # This is the shared library runtime path variable. |
| 3656 | runpath_var=$runpath_var |
| 3657 | |
| 3658 | # This is the shared library path variable. |
| 3659 | shlibpath_var=$shlibpath_var |
| 3660 | |
| 3661 | # Is shlibpath searched before the hard-coded library search path? |
| 3662 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
| 3663 | |
| 3664 | # How to hardcode a shared library path into an executable. |
| 3665 | hardcode_action=$hardcode_action |
| 3666 | |
| 3667 | # Whether we should hardcode library paths into libraries. |
| 3668 | hardcode_into_libs=$hardcode_into_libs |
| 3669 | |
| 3670 | # Flag to hardcode \$libdir into a binary during linking. |
| 3671 | # This must work even if \$libdir does not exist. |
| 3672 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
| 3673 | |
| 3674 | # Whether we need a single -rpath flag with a separated argument. |
| 3675 | hardcode_libdir_separator=$lt_hardcode_libdir_separator |
| 3676 | |
| 3677 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
| 3678 | # resulting binary. |
| 3679 | hardcode_direct=$hardcode_direct |
| 3680 | |
| 3681 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
| 3682 | # resulting binary. |
| 3683 | hardcode_minus_L=$hardcode_minus_L |
| 3684 | |
| 3685 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
| 3686 | # the resulting binary. |
| 3687 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
| 3688 | |
| 3689 | # Variables whose values should be saved in libtool wrapper scripts and |
| 3690 | # restored at relink time. |
| 3691 | variables_saved_for_relink="$variables_saved_for_relink" |
| 3692 | |
| 3693 | # Whether libtool must link a program against all its dependency libraries. |
| 3694 | link_all_deplibs=$link_all_deplibs |
| 3695 | |
| 3696 | # Compile-time system search path for libraries |
| 3697 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
| 3698 | |
| 3699 | # Run-time system search path for libraries |
| 3700 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
| 3701 | |
| 3702 | # Fix the shell variable \$srcfile for the compiler. |
| 3703 | fix_srcfile_path="$fix_srcfile_path" |
| 3704 | |
| 3705 | # Set to yes if exported symbols are required. |
| 3706 | always_export_symbols=$always_export_symbols |
| 3707 | |
| 3708 | # The commands to list exported symbols. |
| 3709 | export_symbols_cmds=$lt_export_symbols_cmds |
| 3710 | |
| 3711 | # The commands to extract the exported symbol list from a shared archive. |
| 3712 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
| 3713 | |
| 3714 | # Symbols that should not be listed in the preloaded symbols. |
| 3715 | exclude_expsyms=$lt_exclude_expsyms |
| 3716 | |
| 3717 | # Symbols that must always be exported. |
| 3718 | include_expsyms=$lt_include_expsyms |
| 3719 | |
| 3720 | # ### END LIBTOOL CONFIG |
| 3721 | |
| 3722 | __EOF__ |
| 3723 | |
| 3724 | case $host_os in |
| 3725 | aix3*) |
| 3726 | cat <<\EOF >> "${ofile}T" |
| 3727 | |
| 3728 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 3729 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 3730 | # vanish in a puff of smoke. |
| 3731 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 3732 | COLLECT_NAMES= |
| 3733 | export COLLECT_NAMES |
| 3734 | fi |
| 3735 | EOF |
| 3736 | ;; |
| 3737 | esac |
| 3738 | |
| 3739 | case $host_os in |
| 3740 | cygwin* | mingw* | pw32* | os2*) |
| 3741 | cat <<'EOF' >> "${ofile}T" |
| 3742 | # This is a source program that is used to create dlls on Windows |
| 3743 | # Don't remove nor modify the starting and closing comments |
| 3744 | # /* ltdll.c starts here */ |
| 3745 | # #define WIN32_LEAN_AND_MEAN |
| 3746 | # #include <windows.h> |
| 3747 | # #undef WIN32_LEAN_AND_MEAN |
| 3748 | # #include <stdio.h> |
| 3749 | # |
| 3750 | # #ifndef __CYGWIN__ |
| 3751 | # # ifdef __CYGWIN32__ |
| 3752 | # # define __CYGWIN__ __CYGWIN32__ |
| 3753 | # # endif |
| 3754 | # #endif |
| 3755 | # |
| 3756 | # #ifdef __cplusplus |
| 3757 | # extern "C" { |
| 3758 | # #endif |
| 3759 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
| 3760 | # #ifdef __cplusplus |
| 3761 | # } |
| 3762 | # #endif |
| 3763 | # |
| 3764 | # #ifdef __CYGWIN__ |
| 3765 | # #include <cygwin/cygwin_dll.h> |
| 3766 | # DECLARE_CYGWIN_DLL( DllMain ); |
| 3767 | # #endif |
| 3768 | # HINSTANCE __hDllInstance_base; |
| 3769 | # |
| 3770 | # BOOL APIENTRY |
| 3771 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
| 3772 | # { |
| 3773 | # __hDllInstance_base = hInst; |
| 3774 | # return TRUE; |
| 3775 | # } |
| 3776 | # /* ltdll.c ends here */ |
| 3777 | # This is a source program that is used to create import libraries |
| 3778 | # on Windows for dlls which lack them. Don't remove nor modify the |
| 3779 | # starting and closing comments |
| 3780 | # /* impgen.c starts here */ |
| 3781 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
| 3782 | # |
| 3783 | # This file is part of GNU libtool. |
| 3784 | # |
| 3785 | # This program is free software; you can redistribute it and/or modify |
| 3786 | # it under the terms of the GNU General Public License as published by |
| 3787 | # the Free Software Foundation; either version 2 of the License, or |
| 3788 | # (at your option) any later version. |
| 3789 | # |
| 3790 | # This program is distributed in the hope that it will be useful, |
| 3791 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3792 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3793 | # GNU General Public License for more details. |
| 3794 | # |
| 3795 | # You should have received a copy of the GNU General Public License |
| 3796 | # along with this program; if not, write to the Free Software |
| 3797 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 3798 | # */ |
| 3799 | # |
| 3800 | # #include <stdio.h> /* for printf() */ |
| 3801 | # #include <unistd.h> /* for open(), lseek(), read() */ |
| 3802 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
| 3803 | # #include <string.h> /* for strdup() */ |
| 3804 | # |
| 3805 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
| 3806 | # #ifndef O_BINARY |
| 3807 | # #define O_BINARY 0 |
| 3808 | # #endif |
| 3809 | # |
| 3810 | # static unsigned int |
| 3811 | # pe_get16 (fd, offset) |
| 3812 | # int fd; |
| 3813 | # int offset; |
| 3814 | # { |
| 3815 | # unsigned char b[2]; |
| 3816 | # lseek (fd, offset, SEEK_SET); |
| 3817 | # read (fd, b, 2); |
| 3818 | # return b[0] + (b[1]<<8); |
| 3819 | # } |
| 3820 | # |
| 3821 | # static unsigned int |
| 3822 | # pe_get32 (fd, offset) |
| 3823 | # int fd; |
| 3824 | # int offset; |
| 3825 | # { |
| 3826 | # unsigned char b[4]; |
| 3827 | # lseek (fd, offset, SEEK_SET); |
| 3828 | # read (fd, b, 4); |
| 3829 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 3830 | # } |
| 3831 | # |
| 3832 | # static unsigned int |
| 3833 | # pe_as32 (ptr) |
| 3834 | # void *ptr; |
| 3835 | # { |
| 3836 | # unsigned char *b = ptr; |
| 3837 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 3838 | # } |
| 3839 | # |
| 3840 | # int |
| 3841 | # main (argc, argv) |
| 3842 | # int argc; |
| 3843 | # char *argv[]; |
| 3844 | # { |
| 3845 | # int dll; |
| 3846 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
| 3847 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
| 3848 | # unsigned long name_rvas, nexp; |
| 3849 | # unsigned char *expdata, *erva; |
| 3850 | # char *filename, *dll_name; |
| 3851 | # |
| 3852 | # filename = argv[1]; |
| 3853 | # |
| 3854 | # dll = open(filename, O_RDONLY|O_BINARY); |
| 3855 | # if (dll < 1) |
| 3856 | # return 1; |
| 3857 | # |
| 3858 | # dll_name = filename; |
| 3859 | # |
| 3860 | # for (i=0; filename[i]; i++) |
| 3861 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
| 3862 | # dll_name = filename + i +1; |
| 3863 | # |
| 3864 | # pe_header_offset = pe_get32 (dll, 0x3c); |
| 3865 | # opthdr_ofs = pe_header_offset + 4 + 20; |
| 3866 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
| 3867 | # |
| 3868 | # if (num_entries < 1) /* no exports */ |
| 3869 | # return 1; |
| 3870 | # |
| 3871 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
| 3872 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
| 3873 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
| 3874 | # secptr = (pe_header_offset + 4 + 20 + |
| 3875 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
| 3876 | # |
| 3877 | # expptr = 0; |
| 3878 | # for (i = 0; i < nsections; i++) |
| 3879 | # { |
| 3880 | # char sname[8]; |
| 3881 | # unsigned long secptr1 = secptr + 40 * i; |
| 3882 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
| 3883 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
| 3884 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
| 3885 | # lseek(dll, secptr1, SEEK_SET); |
| 3886 | # read(dll, sname, 8); |
| 3887 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
| 3888 | # { |
| 3889 | # expptr = fptr + (export_rva - vaddr); |
| 3890 | # if (export_rva + export_size > vaddr + vsize) |
| 3891 | # export_size = vsize - (export_rva - vaddr); |
| 3892 | # break; |
| 3893 | # } |
| 3894 | # } |
| 3895 | # |
| 3896 | # expdata = (unsigned char*)malloc(export_size); |
| 3897 | # lseek (dll, expptr, SEEK_SET); |
| 3898 | # read (dll, expdata, export_size); |
| 3899 | # erva = expdata - export_rva; |
| 3900 | # |
| 3901 | # nexp = pe_as32 (expdata+24); |
| 3902 | # name_rvas = pe_as32 (expdata+32); |
| 3903 | # |
| 3904 | # printf ("EXPORTS\n"); |
| 3905 | # for (i = 0; i<nexp; i++) |
| 3906 | # { |
| 3907 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
| 3908 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
| 3909 | # } |
| 3910 | # |
| 3911 | # return 0; |
| 3912 | # } |
| 3913 | # /* impgen.c ends here */ |
| 3914 | |
| 3915 | EOF |
| 3916 | ;; |
| 3917 | esac |
| 3918 | |
| 3919 | # We use sed instead of cat because bash on DJGPP gets confused if |
| 3920 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
| 3921 | # text mode, it properly converts lines to CR/LF. This bash problem |
| 3922 | # is reportedly fixed, but why not run on old versions too? |
| 3923 | sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
| 3924 | |
| 3925 | mv -f "${ofile}T" "$ofile" || \ |
| 3926 | (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
| 3927 | chmod +x "$ofile" |
| 3928 | fi |
| 3929 | |
| 3930 | ])# _LT_AC_LTCONFIG_HACK |
| 3931 | |
| 3932 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
| 3933 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
| 3934 | |
| 3935 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
| 3936 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
| 3937 | |
| 3938 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
| 3939 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
| 3940 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 3941 | # `yes'. |
| 3942 | AC_DEFUN([AC_ENABLE_SHARED], |
| 3943 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
| 3944 | AC_ARG_ENABLE(shared, |
| 3945 | changequote(<<, >>)dnl |
| 3946 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
| 3947 | changequote([, ])dnl |
| 3948 | [p=${PACKAGE-default} |
| 3949 | case $enableval in |
| 3950 | yes) enable_shared=yes ;; |
| 3951 | no) enable_shared=no ;; |
| 3952 | *) |
| 3953 | enable_shared=no |
| 3954 | # Look at the argument we got. We use all the common list separators. |
| 3955 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 3956 | for pkg in $enableval; do |
| 3957 | if test "X$pkg" = "X$p"; then |
| 3958 | enable_shared=yes |
| 3959 | fi |
| 3960 | done |
| 3961 | IFS="$ac_save_ifs" |
| 3962 | ;; |
| 3963 | esac], |
| 3964 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
| 3965 | ]) |
| 3966 | |
| 3967 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
| 3968 | AC_DEFUN([AC_DISABLE_SHARED], |
| 3969 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3970 | AC_ENABLE_SHARED(no)]) |
| 3971 | |
| 3972 | # AC_ENABLE_STATIC - implement the --enable-static flag |
| 3973 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
| 3974 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 3975 | # `yes'. |
| 3976 | AC_DEFUN([AC_ENABLE_STATIC], |
| 3977 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
| 3978 | AC_ARG_ENABLE(static, |
| 3979 | changequote(<<, >>)dnl |
| 3980 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
| 3981 | changequote([, ])dnl |
| 3982 | [p=${PACKAGE-default} |
| 3983 | case $enableval in |
| 3984 | yes) enable_static=yes ;; |
| 3985 | no) enable_static=no ;; |
| 3986 | *) |
| 3987 | enable_static=no |
| 3988 | # Look at the argument we got. We use all the common list separators. |
| 3989 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 3990 | for pkg in $enableval; do |
| 3991 | if test "X$pkg" = "X$p"; then |
| 3992 | enable_static=yes |
| 3993 | fi |
| 3994 | done |
| 3995 | IFS="$ac_save_ifs" |
| 3996 | ;; |
| 3997 | esac], |
| 3998 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
| 3999 | ]) |
| 4000 | |
| 4001 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
| 4002 | AC_DEFUN([AC_DISABLE_STATIC], |
| 4003 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 4004 | AC_ENABLE_STATIC(no)]) |
| 4005 | |
| 4006 | |
| 4007 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
| 4008 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
| 4009 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 4010 | # `yes'. |
| 4011 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
| 4012 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
| 4013 | AC_ARG_ENABLE(fast-install, |
| 4014 | changequote(<<, >>)dnl |
| 4015 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
| 4016 | changequote([, ])dnl |
| 4017 | [p=${PACKAGE-default} |
| 4018 | case $enableval in |
| 4019 | yes) enable_fast_install=yes ;; |
| 4020 | no) enable_fast_install=no ;; |
| 4021 | *) |
| 4022 | enable_fast_install=no |
| 4023 | # Look at the argument we got. We use all the common list separators. |
| 4024 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 4025 | for pkg in $enableval; do |
| 4026 | if test "X$pkg" = "X$p"; then |
| 4027 | enable_fast_install=yes |
| 4028 | fi |
| 4029 | done |
| 4030 | IFS="$ac_save_ifs" |
| 4031 | ;; |
| 4032 | esac], |
| 4033 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
| 4034 | ]) |
| 4035 | |
| 4036 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
| 4037 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
| 4038 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 4039 | AC_ENABLE_FAST_INSTALL(no)]) |
| 4040 | |
| 4041 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag |
| 4042 | # Usage: AC_LIBTOOL_PICMODE[(MODE)] |
| 4043 | # Where MODE is either `yes' or `no'. If omitted, it defaults to |
| 4044 | # `both'. |
| 4045 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
| 4046 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 4047 | pic_mode=ifelse($#,1,$1,default)]) |
| 4048 | |
| 4049 | |
| 4050 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
| 4051 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
| 4052 | [AC_MSG_CHECKING([for $1]) |
| 4053 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
| 4054 | [case $MAGIC_CMD in |
| 4055 | /*) |
| 4056 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
| 4057 | ;; |
| 4058 | ?:/*) |
| 4059 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
| 4060 | ;; |
| 4061 | *) |
| 4062 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
| 4063 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 4064 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
| 4065 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
| 4066 | dnl not every word. This closes a longstanding sh security hole. |
| 4067 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
| 4068 | for ac_dir in $ac_dummy; do |
| 4069 | test -z "$ac_dir" && ac_dir=. |
| 4070 | if test -f $ac_dir/$1; then |
| 4071 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
| 4072 | if test -n "$file_magic_test_file"; then |
| 4073 | case $deplibs_check_method in |
| 4074 | "file_magic "*) |
| 4075 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
| 4076 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 4077 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
| 4078 | egrep "$file_magic_regex" > /dev/null; then |
| 4079 | : |
| 4080 | else |
| 4081 | cat <<EOF 1>&2 |
| 4082 | |
| 4083 | *** Warning: the command libtool uses to detect shared libraries, |
| 4084 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
| 4085 | *** The result is that libtool may fail to recognize shared libraries |
| 4086 | *** as such. This will affect the creation of libtool libraries that |
| 4087 | *** depend on shared libraries, but programs linked with such libtool |
| 4088 | *** libraries will work regardless of this problem. Nevertheless, you |
| 4089 | *** may want to report the problem to your system manager and/or to |
| 4090 | *** bug-libtool@gnu.org |
| 4091 | |
| 4092 | EOF |
| 4093 | fi ;; |
| 4094 | esac |
| 4095 | fi |
| 4096 | break |
| 4097 | fi |
| 4098 | done |
| 4099 | IFS="$ac_save_ifs" |
| 4100 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
| 4101 | ;; |
| 4102 | esac]) |
| 4103 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 4104 | if test -n "$MAGIC_CMD"; then |
| 4105 | AC_MSG_RESULT($MAGIC_CMD) |
| 4106 | else |
| 4107 | AC_MSG_RESULT(no) |
| 4108 | fi |
| 4109 | ]) |
| 4110 | |
| 4111 | |
| 4112 | # AC_PATH_MAGIC - find a file program which can recognise a shared library |
| 4113 | AC_DEFUN([AC_PATH_MAGIC], |
| 4114 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
| 4115 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
| 4116 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
| 4117 | if test -n "$ac_tool_prefix"; then |
| 4118 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
| 4119 | else |
| 4120 | MAGIC_CMD=: |
| 4121 | fi |
| 4122 | fi |
| 4123 | ]) |
| 4124 | |
| 4125 | |
| 4126 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
| 4127 | AC_DEFUN([AC_PROG_LD], |
| 4128 | [AC_ARG_WITH(gnu-ld, |
| 4129 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
| 4130 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
| 4131 | AC_REQUIRE([AC_PROG_CC])dnl |
| 4132 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 4133 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 4134 | AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
| 4135 | ac_prog=ld |
| 4136 | if test "$GCC" = yes; then |
| 4137 | # Check if gcc -print-prog-name=ld gives a path. |
| 4138 | AC_MSG_CHECKING([for ld used by GCC]) |
| 4139 | case $host in |
| 4140 | *-*-mingw*) |
| 4141 | # gcc leaves a trailing carriage return which upsets mingw |
| 4142 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 4143 | *) |
| 4144 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 4145 | esac |
| 4146 | case $ac_prog in |
| 4147 | # Accept absolute paths. |
| 4148 | [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
| 4149 | re_direlt='/[[^/]][[^/]]*/\.\./' |
| 4150 | # Canonicalize the path of ld |
| 4151 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 4152 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 4153 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 4154 | done |
| 4155 | test -z "$LD" && LD="$ac_prog" |
| 4156 | ;; |
| 4157 | "") |
| 4158 | # If it fails, then pretend we aren't using GCC. |
| 4159 | ac_prog=ld |
| 4160 | ;; |
| 4161 | *) |
| 4162 | # If it is relative, then search for the first ld in PATH. |
| 4163 | with_gnu_ld=unknown |
| 4164 | ;; |
| 4165 | esac |
| 4166 | elif test "$with_gnu_ld" = yes; then |
| 4167 | AC_MSG_CHECKING([for GNU ld]) |
| 4168 | else |
| 4169 | AC_MSG_CHECKING([for non-GNU ld]) |
| 4170 | fi |
| 4171 | AC_CACHE_VAL(lt_cv_path_LD, |
| 4172 | [if test -z "$LD"; then |
| 4173 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 4174 | for ac_dir in $PATH; do |
| 4175 | test -z "$ac_dir" && ac_dir=. |
| 4176 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 4177 | lt_cv_path_LD="$ac_dir/$ac_prog" |
| 4178 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 4179 | # but apparently some GNU ld's only accept -v. |
| 4180 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 4181 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
| 4182 | test "$with_gnu_ld" != no && break |
| 4183 | else |
| 4184 | test "$with_gnu_ld" != yes && break |
| 4185 | fi |
| 4186 | fi |
| 4187 | done |
| 4188 | IFS="$ac_save_ifs" |
| 4189 | else |
| 4190 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
| 4191 | fi]) |
| 4192 | LD="$lt_cv_path_LD" |
| 4193 | if test -n "$LD"; then |
| 4194 | AC_MSG_RESULT($LD) |
| 4195 | else |
| 4196 | AC_MSG_RESULT(no) |
| 4197 | fi |
| 4198 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 4199 | AC_PROG_LD_GNU |
| 4200 | ]) |
| 4201 | |
| 4202 | # AC_PROG_LD_GNU - |
| 4203 | AC_DEFUN([AC_PROG_LD_GNU], |
| 4204 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
| 4205 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 4206 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
| 4207 | lt_cv_prog_gnu_ld=yes |
| 4208 | else |
| 4209 | lt_cv_prog_gnu_ld=no |
| 4210 | fi]) |
| 4211 | with_gnu_ld=$lt_cv_prog_gnu_ld |
| 4212 | ]) |
| 4213 | |
| 4214 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
| 4215 | # -- PORTME Some linkers may need a different reload flag. |
| 4216 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
| 4217 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
| 4218 | [lt_cv_ld_reload_flag='-r']) |
| 4219 | reload_flag=$lt_cv_ld_reload_flag |
| 4220 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
| 4221 | ]) |
| 4222 | |
| 4223 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
| 4224 | # -- PORTME fill in with the dynamic library characteristics |
| 4225 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
| 4226 | [AC_CACHE_CHECK([how to recognise dependant libraries], |
| 4227 | lt_cv_deplibs_check_method, |
| 4228 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
| 4229 | lt_cv_file_magic_test_file= |
| 4230 | lt_cv_deplibs_check_method='unknown' |
| 4231 | # Need to set the preceding variable on all platforms that support |
| 4232 | # interlibrary dependencies. |
| 4233 | # 'none' -- dependencies not supported. |
| 4234 | # `unknown' -- same as none, but documents that we really don't know. |
| 4235 | # 'pass_all' -- all dependencies passed with no checks. |
| 4236 | # 'test_compile' -- check by making test program. |
| 4237 | # 'file_magic [[regex]]' -- check by looking for files in library path |
| 4238 | # which responds to the $file_magic_cmd with a given egrep regex. |
| 4239 | # If you have `file' or equivalent on your system and you're not sure |
| 4240 | # whether `pass_all' will *always* work, you probably want this one. |
| 4241 | |
| 4242 | case $host_os in |
| 4243 | aix4* | aix5*) |
| 4244 | lt_cv_deplibs_check_method=pass_all |
| 4245 | ;; |
| 4246 | |
| 4247 | beos*) |
| 4248 | lt_cv_deplibs_check_method=pass_all |
| 4249 | ;; |
| 4250 | |
| 4251 | bsdi4*) |
| 4252 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
| 4253 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 4254 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 4255 | ;; |
| 4256 | |
| 4257 | cygwin* | mingw* | pw32*) |
| 4258 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
| 4259 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 4260 | ;; |
| 4261 | |
| 4262 | darwin* | rhapsody*) |
| 4263 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
| 4264 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 4265 | case "$host_os" in |
| 4266 | rhapsody* | darwin1.[[012]]) |
| 4267 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
| 4268 | ;; |
| 4269 | *) # Darwin 1.3 on |
| 4270 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
| 4271 | ;; |
| 4272 | esac |
| 4273 | ;; |
| 4274 | |
| 4275 | freebsd*) |
| 4276 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 4277 | case $host_cpu in |
| 4278 | i*86 ) |
| 4279 | # Not sure whether the presence of OpenBSD here was a mistake. |
| 4280 | # Let's accept both of them until this is cleared up. |
| 4281 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
| 4282 | lt_cv_file_magic_cmd=/usr/bin/file |
| 4283 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 4284 | ;; |
| 4285 | esac |
| 4286 | else |
| 4287 | lt_cv_deplibs_check_method=pass_all |
| 4288 | fi |
| 4289 | ;; |
| 4290 | |
| 4291 | gnu*) |
| 4292 | lt_cv_deplibs_check_method=pass_all |
| 4293 | ;; |
| 4294 | |
| 4295 | hpux10.20*|hpux11*) |
| 4296 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
| 4297 | lt_cv_file_magic_cmd=/usr/bin/file |
| 4298 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
| 4299 | ;; |
| 4300 | |
| 4301 | irix5* | irix6*) |
| 4302 | case $host_os in |
| 4303 | irix5*) |
| 4304 | # this will be overridden with pass_all, but let us keep it just in case |
| 4305 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
| 4306 | ;; |
| 4307 | *) |
| 4308 | case $LD in |
| 4309 | *-32|*"-32 ") libmagic=32-bit;; |
| 4310 | *-n32|*"-n32 ") libmagic=N32;; |
| 4311 | *-64|*"-64 ") libmagic=64-bit;; |
| 4312 | *) libmagic=never-match;; |
| 4313 | esac |
| 4314 | # this will be overridden with pass_all, but let us keep it just in case |
| 4315 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
| 4316 | ;; |
| 4317 | esac |
| 4318 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
| 4319 | lt_cv_deplibs_check_method=pass_all |
| 4320 | ;; |
| 4321 | |
| 4322 | # This must be Linux ELF. |
| 4323 | linux-gnu*) |
| 4324 | case $host_cpu in |
| 4325 | alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) |
| 4326 | lt_cv_deplibs_check_method=pass_all ;; |
| 4327 | *) |
| 4328 | # glibc up to 2.1.1 does not perform some relocations on ARM |
| 4329 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
| 4330 | esac |
| 4331 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
| 4332 | ;; |
| 4333 | |
| 4334 | netbsd*) |
| 4335 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 4336 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
| 4337 | else |
| 4338 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
| 4339 | fi |
| 4340 | ;; |
| 4341 | |
| 4342 | newos6*) |
| 4343 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
| 4344 | lt_cv_file_magic_cmd=/usr/bin/file |
| 4345 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
| 4346 | ;; |
| 4347 | |
| 4348 | openbsd*) |
| 4349 | lt_cv_file_magic_cmd=/usr/bin/file |
| 4350 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 4351 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 4352 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
| 4353 | else |
| 4354 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
| 4355 | fi |
| 4356 | ;; |
| 4357 | |
| 4358 | osf3* | osf4* | osf5*) |
| 4359 | # this will be overridden with pass_all, but let us keep it just in case |
| 4360 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
| 4361 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 4362 | lt_cv_deplibs_check_method=pass_all |
| 4363 | ;; |
| 4364 | |
| 4365 | sco3.2v5*) |
| 4366 | lt_cv_deplibs_check_method=pass_all |
| 4367 | ;; |
| 4368 | |
| 4369 | solaris*) |
| 4370 | lt_cv_deplibs_check_method=pass_all |
| 4371 | lt_cv_file_magic_test_file=/lib/libc.so |
| 4372 | ;; |
| 4373 | |
| 4374 | sysv5uw[[78]]* | sysv4*uw2*) |
| 4375 | lt_cv_deplibs_check_method=pass_all |
| 4376 | ;; |
| 4377 | |
| 4378 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 4379 | case $host_vendor in |
| 4380 | motorola) |
| 4381 | 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]]' |
| 4382 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
| 4383 | ;; |
| 4384 | ncr) |
| 4385 | lt_cv_deplibs_check_method=pass_all |
| 4386 | ;; |
| 4387 | sequent) |
| 4388 | lt_cv_file_magic_cmd='/bin/file' |
| 4389 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
| 4390 | ;; |
| 4391 | sni) |
| 4392 | lt_cv_file_magic_cmd='/bin/file' |
| 4393 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
| 4394 | lt_cv_file_magic_test_file=/lib/libc.so |
| 4395 | ;; |
| 4396 | esac |
| 4397 | ;; |
| 4398 | esac |
| 4399 | ]) |
| 4400 | file_magic_cmd=$lt_cv_file_magic_cmd |
| 4401 | deplibs_check_method=$lt_cv_deplibs_check_method |
| 4402 | ]) |
| 4403 | |
| 4404 | |
| 4405 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
| 4406 | AC_DEFUN([AC_PROG_NM], |
| 4407 | [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
| 4408 | AC_MSG_CHECKING([for BSD-compatible nm]) |
| 4409 | AC_CACHE_VAL(lt_cv_path_NM, |
| 4410 | [if test -n "$NM"; then |
| 4411 | # Let the user override the test. |
| 4412 | lt_cv_path_NM="$NM" |
| 4413 | else |
| 4414 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 4415 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
| 4416 | test -z "$ac_dir" && ac_dir=. |
| 4417 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
| 4418 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
| 4419 | # Check to see if the nm accepts a BSD-compat flag. |
| 4420 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
| 4421 | # nm: unknown option "B" ignored |
| 4422 | # Tru64's nm complains that /dev/null is an invalid object file |
| 4423 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
| 4424 | lt_cv_path_NM="$tmp_nm -B" |
| 4425 | break |
| 4426 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
| 4427 | lt_cv_path_NM="$tmp_nm -p" |
| 4428 | break |
| 4429 | else |
| 4430 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
| 4431 | continue # so that we can try to find one that supports BSD flags |
| 4432 | fi |
| 4433 | fi |
| 4434 | done |
| 4435 | IFS="$ac_save_ifs" |
| 4436 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
| 4437 | fi]) |
| 4438 | NM="$lt_cv_path_NM" |
| 4439 | AC_MSG_RESULT([$NM]) |
| 4440 | ]) |
| 4441 | |
| 4442 | # AC_CHECK_LIBM - check for math library |
| 4443 | AC_DEFUN([AC_CHECK_LIBM], |
| 4444 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 4445 | LIBM= |
| 4446 | case $host in |
| 4447 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
| 4448 | # These system don't have libm |
| 4449 | ;; |
| 4450 | *-ncr-sysv4.3*) |
| 4451 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
| 4452 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
| 4453 | ;; |
| 4454 | *) |
| 4455 | AC_CHECK_LIB(m, main, LIBM="-lm") |
| 4456 | ;; |
| 4457 | esac |
| 4458 | ]) |
| 4459 | |
| 4460 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
| 4461 | # the libltdl convenience library and INCLTDL to the include flags for |
| 4462 | # the libltdl header and adds --enable-ltdl-convenience to the |
| 4463 | # configure arguments. Note that LIBLTDL and INCLTDL are not |
| 4464 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
| 4465 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
| 4466 | # with '${top_builddir}/' and INCLTDL will be prefixed with |
| 4467 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
| 4468 | # flat and you're not using automake, define top_builddir and |
| 4469 | # top_srcdir appropriately in the Makefiles. |
| 4470 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
| 4471 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 4472 | case $enable_ltdl_convenience in |
| 4473 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
| 4474 | "") enable_ltdl_convenience=yes |
| 4475 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
| 4476 | esac |
| 4477 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
| 4478 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 4479 | ]) |
| 4480 | |
| 4481 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
| 4482 | # the libltdl installable library and INCLTDL to the include flags for |
| 4483 | # the libltdl header and adds --enable-ltdl-install to the configure |
| 4484 | # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
| 4485 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
| 4486 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
| 4487 | # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
| 4488 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
| 4489 | # not flat and you're not using automake, define top_builddir and |
| 4490 | # top_srcdir appropriately in the Makefiles. |
| 4491 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
| 4492 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
| 4493 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 4494 | AC_CHECK_LIB(ltdl, main, |
| 4495 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
| 4496 | [if test x"$enable_ltdl_install" = xno; then |
| 4497 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
| 4498 | else |
| 4499 | enable_ltdl_install=yes |
| 4500 | fi |
| 4501 | ]) |
| 4502 | if test x"$enable_ltdl_install" = x"yes"; then |
| 4503 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
| 4504 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
| 4505 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 4506 | else |
| 4507 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
| 4508 | LIBLTDL="-lltdl" |
| 4509 | INCLTDL= |
| 4510 | fi |
| 4511 | ]) |
| 4512 | |
| 4513 | # old names |
| 4514 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
| 4515 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
| 4516 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
| 4517 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
| 4518 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
| 4519 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
| 4520 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
| 4521 | |
| 4522 | # This is just to silence aclocal about the macro not being used |
| 4523 | ifelse([AC_DISABLE_FAST_INSTALL]) |
| 4524 | |
| 4525 | dnl test for libt2n and libt2n-codegen |
| 4526 | dnl LIBT2N(VERSION, action-if, action-not) |
| 4527 | AC_DEFUN([LIBT2N_CHECK], |
| 4528 | [ |
| 4529 | PKG_CHECK_MODULES(LIBT2N, [$1], [$2], [$3]) |
| 4530 | LIBT2N_CODEGEN=`$PKG_CONFIG --variable libt2n_codegen libt2n` |
| 4531 | LIBT2N_DATADIR=`$PKG_CONFIG --variable libt2n_datadir libt2n` |
| 4532 | LIBT2N_CLIENT_PCTEMPLATE="$LIBT2N_DATADIR/clientlib.pc.in" |
| 4533 | AC_SUBST(LIBT2N_CODEGEN) |
| 4534 | AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE) |
| 4535 | ]) |
| 4536 | |
| 4537 | |
| 4538 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
| 4539 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
| 4540 | dnl also defines GSTUFF_PKG_ERRORS on error |
| 4541 | AC_DEFUN(PKG_CHECK_MODULES, [ |
| 4542 | succeeded=no |
| 4543 | |
| 4544 | if test -z "$PKG_CONFIG"; then |
| 4545 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| 4546 | fi |
| 4547 | |
| 4548 | if test "$PKG_CONFIG" = "no" ; then |
| 4549 | echo "*** The pkg-config script could not be found. Make sure it is" |
| 4550 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
| 4551 | echo "*** to the full path to pkg-config." |
| 4552 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| 4553 | else |
| 4554 | PKG_CONFIG_MIN_VERSION=0.9.0 |
| 4555 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| 4556 | AC_MSG_CHECKING(for $2) |
| 4557 | |
| 4558 | if $PKG_CONFIG --exists "$2" ; then |
| 4559 | AC_MSG_RESULT(yes) |
| 4560 | succeeded=yes |
| 4561 | |
| 4562 | AC_MSG_CHECKING($1_CFLAGS) |
| 4563 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
| 4564 | AC_MSG_RESULT($$1_CFLAGS) |
| 4565 | |
| 4566 | AC_MSG_CHECKING($1_LIBS) |
| 4567 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
| 4568 | AC_MSG_RESULT($$1_LIBS) |
| 4569 | else |
| 4570 | $1_CFLAGS="" |
| 4571 | $1_LIBS="" |
| 4572 | ## If we have a custom action on failure, don't print errors, but |
| 4573 | ## do set a variable so people can do so. |
| 4574 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
| 4575 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
| 4576 | fi |
| 4577 | |
| 4578 | AC_SUBST($1_CFLAGS) |
| 4579 | AC_SUBST($1_LIBS) |
| 4580 | else |
| 4581 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
| 4582 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
| 4583 | fi |
| 4584 | fi |
| 4585 | |
| 4586 | if test $succeeded = yes; then |
| 4587 | ifelse([$3], , :, [$3]) |
| 4588 | else |
| 4589 | ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
| 4590 | fi |
| 4591 | ]) |
| 4592 | |
| 4593 | |
| 4594 | |