| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | AC_PREREQ(2.50) |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | AC_DEFUN([AC_LIB_LINKFLAGS], |
|---|
| 16 | [ |
|---|
| 17 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 18 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 19 | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 20 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 21 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 22 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
|---|
| 23 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 24 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
|---|
| 25 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
|---|
| 26 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
|---|
| 27 | ]) |
|---|
| 28 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
|---|
| 29 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
|---|
| 30 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
|---|
| 31 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 32 | AC_SUBST([LIB]NAME) |
|---|
| 33 | AC_SUBST([LTLIB]NAME) |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | HAVE_LIB[]NAME=yes |
|---|
| 37 | undefine([Name]) |
|---|
| 38 | undefine([NAME]) |
|---|
| 39 | ]) |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
|---|
| 50 | [ |
|---|
| 51 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 52 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 53 | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 54 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 55 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | ac_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 65 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 66 | |
|---|
| 67 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
|---|
| 68 | ac_save_LIBS="$LIBS" |
|---|
| 69 | LIBS="$LIBS $LIB[]NAME" |
|---|
| 70 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
|---|
| 71 | LIBS="$ac_save_LIBS" |
|---|
| 72 | ]) |
|---|
| 73 | if test "$ac_cv_lib[]Name" = yes; then |
|---|
| 74 | HAVE_LIB[]NAME=yes |
|---|
| 75 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
|---|
| 76 | AC_MSG_CHECKING([how to link with lib[]$1]) |
|---|
| 77 | AC_MSG_RESULT([$LIB[]NAME]) |
|---|
| 78 | else |
|---|
| 79 | HAVE_LIB[]NAME=no |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | CPPFLAGS="$ac_save_CPPFLAGS" |
|---|
| 83 | LIB[]NAME= |
|---|
| 84 | LTLIB[]NAME= |
|---|
| 85 | fi |
|---|
| 86 | AC_SUBST([HAVE_LIB]NAME) |
|---|
| 87 | AC_SUBST([LIB]NAME) |
|---|
| 88 | AC_SUBST([LTLIB]NAME) |
|---|
| 89 | undefine([Name]) |
|---|
| 90 | undefine([NAME]) |
|---|
| 91 | ]) |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | AC_DEFUN([AC_LIB_RPATH], |
|---|
| 97 | [ |
|---|
| 98 | |
|---|
| 99 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) |
|---|
| 100 | AC_REQUIRE([AC_PROG_CC]) |
|---|
| 101 | AC_REQUIRE([AC_LIB_PROG_LD]) |
|---|
| 102 | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 103 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) |
|---|
| 104 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
|---|
| 105 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
|---|
| 106 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
|---|
| 107 | . ./conftest.sh |
|---|
| 108 | rm -f ./conftest.sh |
|---|
| 109 | acl_cv_rpath=done |
|---|
| 110 | ]) |
|---|
| 111 | wl="$acl_cv_wl" |
|---|
| 112 | libext="$acl_cv_libext" |
|---|
| 113 | shlibext="$acl_cv_shlibext" |
|---|
| 114 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
|---|
| 115 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
|---|
| 116 | hardcode_direct="$acl_cv_hardcode_direct" |
|---|
| 117 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
|---|
| 118 | |
|---|
| 119 | AC_ARG_ENABLE(rpath, |
|---|
| 120 | [ --disable-rpath do not hardcode runtime library paths], |
|---|
| 121 | :, enable_rpath=yes) |
|---|
| 122 | ]) |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
|---|
| 128 | [ |
|---|
| 129 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 130 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 131 | |
|---|
| 132 | use_additional=yes |
|---|
| 133 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 134 | eval additional_includedir=\"$includedir\" |
|---|
| 135 | eval additional_libdir=\"$libdir\" |
|---|
| 136 | ]) |
|---|
| 137 | AC_LIB_ARG_WITH([lib$1-prefix], |
|---|
| 138 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
|---|
| 139 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
|---|
| 140 | [ |
|---|
| 141 | if test "X$withval" = "Xno"; then |
|---|
| 142 | use_additional=no |
|---|
| 143 | else |
|---|
| 144 | if test "X$withval" = "X"; then |
|---|
| 145 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 146 | eval additional_includedir=\"$includedir\" |
|---|
| 147 | eval additional_libdir=\"$libdir\" |
|---|
| 148 | ]) |
|---|
| 149 | else |
|---|
| 150 | additional_includedir="$withval/include" |
|---|
| 151 | additional_libdir="$withval/lib" |
|---|
| 152 | fi |
|---|
| 153 | fi |
|---|
| 154 | ]) |
|---|
| 155 | |
|---|
| 156 | |
|---|
| 157 | LIB[]NAME= |
|---|
| 158 | LTLIB[]NAME= |
|---|
| 159 | INC[]NAME= |
|---|
| 160 | rpathdirs= |
|---|
| 161 | ltrpathdirs= |
|---|
| 162 | names_already_handled= |
|---|
| 163 | names_next_round='$1 $2' |
|---|
| 164 | while test -n "$names_next_round"; do |
|---|
| 165 | names_this_round="$names_next_round" |
|---|
| 166 | names_next_round= |
|---|
| 167 | for name in $names_this_round; do |
|---|
| 168 | already_handled= |
|---|
| 169 | for n in $names_already_handled; do |
|---|
| 170 | if test "$n" = "$name"; then |
|---|
| 171 | already_handled=yes |
|---|
| 172 | break |
|---|
| 173 | fi |
|---|
| 174 | done |
|---|
| 175 | if test -z "$already_handled"; then |
|---|
| 176 | names_already_handled="$names_already_handled $name" |
|---|
| 177 | |
|---|
| 178 | |
|---|
| 179 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
|---|
| 180 | eval value=\"\$HAVE_LIB$uppername\" |
|---|
| 181 | if test -n "$value"; then |
|---|
| 182 | if test "$value" = yes; then |
|---|
| 183 | eval value=\"\$LIB$uppername\" |
|---|
| 184 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
|---|
| 185 | eval value=\"\$LTLIB$uppername\" |
|---|
| 186 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
|---|
| 187 | else |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | : |
|---|
| 191 | fi |
|---|
| 192 | else |
|---|
| 193 | |
|---|
| 194 | |
|---|
| 195 | found_dir= |
|---|
| 196 | found_la= |
|---|
| 197 | found_so= |
|---|
| 198 | found_a= |
|---|
| 199 | if test $use_additional = yes; then |
|---|
| 200 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
|---|
| 201 | found_dir="$additional_libdir" |
|---|
| 202 | found_so="$additional_libdir/lib$name.$shlibext" |
|---|
| 203 | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 204 | found_la="$additional_libdir/lib$name.la" |
|---|
| 205 | fi |
|---|
| 206 | else |
|---|
| 207 | if test -f "$additional_libdir/lib$name.$libext"; then |
|---|
| 208 | found_dir="$additional_libdir" |
|---|
| 209 | found_a="$additional_libdir/lib$name.$libext" |
|---|
| 210 | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 211 | found_la="$additional_libdir/lib$name.la" |
|---|
| 212 | fi |
|---|
| 213 | fi |
|---|
| 214 | fi |
|---|
| 215 | fi |
|---|
| 216 | if test "X$found_dir" = "X"; then |
|---|
| 217 | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 218 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 219 | case "$x" in |
|---|
| 220 | -L*) |
|---|
| 221 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
|---|
| 222 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
|---|
| 223 | found_dir="$dir" |
|---|
| 224 | found_so="$dir/lib$name.$shlibext" |
|---|
| 225 | if test -f "$dir/lib$name.la"; then |
|---|
| 226 | found_la="$dir/lib$name.la" |
|---|
| 227 | fi |
|---|
| 228 | else |
|---|
| 229 | if test -f "$dir/lib$name.$libext"; then |
|---|
| 230 | found_dir="$dir" |
|---|
| 231 | found_a="$dir/lib$name.$libext" |
|---|
| 232 | if test -f "$dir/lib$name.la"; then |
|---|
| 233 | found_la="$dir/lib$name.la" |
|---|
| 234 | fi |
|---|
| 235 | fi |
|---|
| 236 | fi |
|---|
| 237 | ;; |
|---|
| 238 | esac |
|---|
| 239 | if test "X$found_dir" != "X"; then |
|---|
| 240 | break |
|---|
| 241 | fi |
|---|
| 242 | done |
|---|
| 243 | fi |
|---|
| 244 | if test "X$found_dir" != "X"; then |
|---|
| 245 | |
|---|
| 246 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 247 | if test "X$found_so" != "X"; then |
|---|
| 248 | |
|---|
| 249 | |
|---|
| 250 | |
|---|
| 251 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
|---|
| 252 | |
|---|
| 253 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 254 | else |
|---|
| 255 | |
|---|
| 256 | |
|---|
| 257 | |
|---|
| 258 | |
|---|
| 259 | haveit= |
|---|
| 260 | for x in $ltrpathdirs; do |
|---|
| 261 | if test "X$x" = "X$found_dir"; then |
|---|
| 262 | haveit=yes |
|---|
| 263 | break |
|---|
| 264 | fi |
|---|
| 265 | done |
|---|
| 266 | if test -z "$haveit"; then |
|---|
| 267 | ltrpathdirs="$ltrpathdirs $found_dir" |
|---|
| 268 | fi |
|---|
| 269 | |
|---|
| 270 | if test "$hardcode_direct" = yes; then |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 274 | else |
|---|
| 275 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
|---|
| 276 | |
|---|
| 277 | |
|---|
| 278 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 279 | |
|---|
| 280 | |
|---|
| 281 | haveit= |
|---|
| 282 | for x in $rpathdirs; do |
|---|
| 283 | if test "X$x" = "X$found_dir"; then |
|---|
| 284 | haveit=yes |
|---|
| 285 | break |
|---|
| 286 | fi |
|---|
| 287 | done |
|---|
| 288 | if test -z "$haveit"; then |
|---|
| 289 | rpathdirs="$rpathdirs $found_dir" |
|---|
| 290 | fi |
|---|
| 291 | else |
|---|
| 292 | |
|---|
| 293 | |
|---|
| 294 | |
|---|
| 295 | haveit= |
|---|
| 296 | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 297 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 298 | if test "X$x" = "X-L$found_dir"; then |
|---|
| 299 | haveit=yes |
|---|
| 300 | break |
|---|
| 301 | fi |
|---|
| 302 | done |
|---|
| 303 | if test -z "$haveit"; then |
|---|
| 304 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
|---|
| 305 | fi |
|---|
| 306 | if test "$hardcode_minus_L" != no; then |
|---|
| 307 | |
|---|
| 308 | |
|---|
| 309 | |
|---|
| 310 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 311 | else |
|---|
| 312 | |
|---|
| 313 | |
|---|
| 314 | |
|---|
| 315 | |
|---|
| 316 | |
|---|
| 317 | |
|---|
| 318 | |
|---|
| 319 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 320 | fi |
|---|
| 321 | fi |
|---|
| 322 | fi |
|---|
| 323 | fi |
|---|
| 324 | else |
|---|
| 325 | if test "X$found_a" != "X"; then |
|---|
| 326 | |
|---|
| 327 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
|---|
| 328 | else |
|---|
| 329 | |
|---|
| 330 | |
|---|
| 331 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 332 | fi |
|---|
| 333 | fi |
|---|
| 334 | |
|---|
| 335 | additional_includedir= |
|---|
| 336 | case "$found_dir" in |
|---|
| 337 | */lib | */lib/) |
|---|
| 338 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
|---|
| 339 | additional_includedir="$basedir/include" |
|---|
| 340 | ;; |
|---|
| 341 | esac |
|---|
| 342 | if test "X$additional_includedir" != "X"; then |
|---|
| 343 | |
|---|
| 344 | |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | |
|---|
| 348 | |
|---|
| 349 | |
|---|
| 350 | if test "X$additional_includedir" != "X/usr/include"; then |
|---|
| 351 | haveit= |
|---|
| 352 | if test "X$additional_includedir" = "X/usr/local/include"; then |
|---|
| 353 | if test -n "$GCC"; then |
|---|
| 354 | case $host_os in |
|---|
| 355 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
|---|
| 356 | esac |
|---|
| 357 | fi |
|---|
| 358 | fi |
|---|
| 359 | if test -z "$haveit"; then |
|---|
| 360 | for x in $CPPFLAGS $INC[]NAME; do |
|---|
| 361 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 362 | if test "X$x" = "X-I$additional_includedir"; then |
|---|
| 363 | haveit=yes |
|---|
| 364 | break |
|---|
| 365 | fi |
|---|
| 366 | done |
|---|
| 367 | if test -z "$haveit"; then |
|---|
| 368 | if test -d "$additional_includedir"; then |
|---|
| 369 | |
|---|
| 370 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
|---|
| 371 | fi |
|---|
| 372 | fi |
|---|
| 373 | fi |
|---|
| 374 | fi |
|---|
| 375 | fi |
|---|
| 376 | |
|---|
| 377 | if test -n "$found_la"; then |
|---|
| 378 | |
|---|
| 379 | |
|---|
| 380 | |
|---|
| 381 | save_libdir="$libdir" |
|---|
| 382 | case "$found_la" in |
|---|
| 383 | */* | *\\*) . "$found_la" ;; |
|---|
| 384 | *) . "./$found_la" ;; |
|---|
| 385 | esac |
|---|
| 386 | libdir="$save_libdir" |
|---|
| 387 | |
|---|
| 388 | for dep in $dependency_libs; do |
|---|
| 389 | case "$dep" in |
|---|
| 390 | -L*) |
|---|
| 391 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
|---|
| 392 | |
|---|
| 393 | |
|---|
| 394 | |
|---|
| 395 | |
|---|
| 396 | |
|---|
| 397 | |
|---|
| 398 | |
|---|
| 399 | if test "X$additional_libdir" != "X/usr/lib"; then |
|---|
| 400 | haveit= |
|---|
| 401 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
|---|
| 402 | if test -n "$GCC"; then |
|---|
| 403 | case $host_os in |
|---|
| 404 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
|---|
| 405 | esac |
|---|
| 406 | fi |
|---|
| 407 | fi |
|---|
| 408 | if test -z "$haveit"; then |
|---|
| 409 | haveit= |
|---|
| 410 | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 411 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 412 | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 413 | haveit=yes |
|---|
| 414 | break |
|---|
| 415 | fi |
|---|
| 416 | done |
|---|
| 417 | if test -z "$haveit"; then |
|---|
| 418 | if test -d "$additional_libdir"; then |
|---|
| 419 | |
|---|
| 420 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
|---|
| 421 | fi |
|---|
| 422 | fi |
|---|
| 423 | haveit= |
|---|
| 424 | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 425 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 426 | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 427 | haveit=yes |
|---|
| 428 | break |
|---|
| 429 | fi |
|---|
| 430 | done |
|---|
| 431 | if test -z "$haveit"; then |
|---|
| 432 | if test -d "$additional_libdir"; then |
|---|
| 433 | |
|---|
| 434 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
|---|
| 435 | fi |
|---|
| 436 | fi |
|---|
| 437 | fi |
|---|
| 438 | fi |
|---|
| 439 | ;; |
|---|
| 440 | -R*) |
|---|
| 441 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
|---|
| 442 | if test "$enable_rpath" != no; then |
|---|
| 443 | |
|---|
| 444 | |
|---|
| 445 | haveit= |
|---|
| 446 | for x in $rpathdirs; do |
|---|
| 447 | if test "X$x" = "X$dir"; then |
|---|
| 448 | haveit=yes |
|---|
| 449 | break |
|---|
| 450 | fi |
|---|
| 451 | done |
|---|
| 452 | if test -z "$haveit"; then |
|---|
| 453 | rpathdirs="$rpathdirs $dir" |
|---|
| 454 | fi |
|---|
| 455 | |
|---|
| 456 | |
|---|
| 457 | haveit= |
|---|
| 458 | for x in $ltrpathdirs; do |
|---|
| 459 | if test "X$x" = "X$dir"; then |
|---|
| 460 | haveit=yes |
|---|
| 461 | break |
|---|
| 462 | fi |
|---|
| 463 | done |
|---|
| 464 | if test -z "$haveit"; then |
|---|
| 465 | ltrpathdirs="$ltrpathdirs $dir" |
|---|
| 466 | fi |
|---|
| 467 | fi |
|---|
| 468 | ;; |
|---|
| 469 | -l*) |
|---|
| 470 | |
|---|
| 471 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
|---|
| 472 | ;; |
|---|
| 473 | *.la) |
|---|
| 474 | |
|---|
| 475 | |
|---|
| 476 | dnl option. |
|---|
| 477 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
|---|
| 478 | ;; |
|---|
| 479 | *) |
|---|
| 480 | |
|---|
| 481 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
|---|
| 482 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
|---|
| 483 | ;; |
|---|
| 484 | esac |
|---|
| 485 | done |
|---|
| 486 | fi |
|---|
| 487 | else |
|---|
| 488 | |
|---|
| 489 | |
|---|
| 490 | |
|---|
| 491 | |
|---|
| 492 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 493 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
|---|
| 494 | fi |
|---|
| 495 | fi |
|---|
| 496 | fi |
|---|
| 497 | done |
|---|
| 498 | done |
|---|
| 499 | if test "X$rpathdirs" != "X"; then |
|---|
| 500 | if test -n "$hardcode_libdir_separator"; then |
|---|
| 501 | |
|---|
| 502 | |
|---|
| 503 | |
|---|
| 504 | alldirs= |
|---|
| 505 | for found_dir in $rpathdirs; do |
|---|
| 506 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
|---|
| 507 | done |
|---|
| 508 | |
|---|
| 509 | acl_save_libdir="$libdir" |
|---|
| 510 | libdir="$alldirs" |
|---|
| 511 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 512 | libdir="$acl_save_libdir" |
|---|
| 513 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 514 | else |
|---|
| 515 | |
|---|
| 516 | for found_dir in $rpathdirs; do |
|---|
| 517 | acl_save_libdir="$libdir" |
|---|
| 518 | libdir="$found_dir" |
|---|
| 519 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 520 | libdir="$acl_save_libdir" |
|---|
| 521 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 522 | done |
|---|
| 523 | fi |
|---|
| 524 | fi |
|---|
| 525 | if test "X$ltrpathdirs" != "X"; then |
|---|
| 526 | |
|---|
| 527 | |
|---|
| 528 | for found_dir in $ltrpathdirs; do |
|---|
| 529 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
|---|
| 530 | done |
|---|
| 531 | fi |
|---|
| 532 | ]) |
|---|
| 533 | |
|---|
| 534 | |
|---|
| 535 | |
|---|
| 536 | |
|---|
| 537 | |
|---|
| 538 | AC_DEFUN([AC_LIB_APPENDTOVAR], |
|---|
| 539 | [ |
|---|
| 540 | for element in [$2]; do |
|---|
| 541 | haveit= |
|---|
| 542 | for x in $[$1]; do |
|---|
| 543 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 544 | if test "X$x" = "X$element"; then |
|---|
| 545 | haveit=yes |
|---|
| 546 | break |
|---|
| 547 | fi |
|---|
| 548 | done |
|---|
| 549 | if test -z "$haveit"; then |
|---|
| 550 | [$1]="${[$1]}${[$1]:+ }$element" |
|---|
| 551 | fi |
|---|
| 552 | done |
|---|
| 553 | ]) |
|---|