| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], |
|---|
| 23 | [ |
|---|
| 24 | |
|---|
| 25 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 26 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | AC_LIB_LINKFLAGS_BODY([iconv]) |
|---|
| 31 | ]) |
|---|
| 32 | |
|---|
| 33 | AC_DEFUN([AM_ICONV_LINK], |
|---|
| 34 | [ |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | am_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 47 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) |
|---|
| 48 | |
|---|
| 49 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
|---|
| 50 | am_cv_func_iconv="no, consider installing GNU libiconv" |
|---|
| 51 | am_cv_lib_iconv=no |
|---|
| 52 | AC_TRY_LINK([ |
|---|
| 53 | |
|---|
| 54 | [iconv_t cd = iconv_open("",""); |
|---|
| 55 | iconv(cd,NULL,NULL,NULL,NULL); |
|---|
| 56 | iconv_close(cd);], |
|---|
| 57 | am_cv_func_iconv=yes) |
|---|
| 58 | if test "$am_cv_func_iconv" != yes; then |
|---|
| 59 | am_save_LIBS="$LIBS" |
|---|
| 60 | LIBS="$LIBS $LIBICONV" |
|---|
| 61 | AC_TRY_LINK([ |
|---|
| 62 | |
|---|
| 63 | [iconv_t cd = iconv_open("",""); |
|---|
| 64 | iconv(cd,NULL,NULL,NULL,NULL); |
|---|
| 65 | iconv_close(cd);], |
|---|
| 66 | am_cv_lib_iconv=yes |
|---|
| 67 | am_cv_func_iconv=yes) |
|---|
| 68 | LIBS="$am_save_LIBS" |
|---|
| 69 | fi |
|---|
| 70 | ]) |
|---|
| 71 | if test "$am_cv_func_iconv" = yes; then |
|---|
| 72 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
|---|
| 73 | fi |
|---|
| 74 | if test "$am_cv_lib_iconv" = yes; then |
|---|
| 75 | AC_MSG_CHECKING([how to link with libiconv]) |
|---|
| 76 | AC_MSG_RESULT([$LIBICONV]) |
|---|
| 77 | else |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | CPPFLAGS="$am_save_CPPFLAGS" |
|---|
| 81 | LIBICONV= |
|---|
| 82 | LTLIBICONV= |
|---|
| 83 | fi |
|---|
| 84 | AC_SUBST(LIBICONV) |
|---|
| 85 | AC_SUBST(LTLIBICONV) |
|---|
| 86 | ]) |
|---|
| 87 | |
|---|
| 88 | AC_DEFUN([AM_ICONV], |
|---|
| 89 | [ |
|---|
| 90 | AM_ICONV_LINK |
|---|
| 91 | if test "$am_cv_func_iconv" = yes; then |
|---|
| 92 | AC_MSG_CHECKING([for iconv declaration]) |
|---|
| 93 | AC_CACHE_VAL(am_cv_proto_iconv, [ |
|---|
| 94 | AC_TRY_COMPILE([ |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | extern |
|---|
| 98 | |
|---|
| 99 | "C" |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
|---|
| 103 | |
|---|
| 104 | size_t iconv(); |
|---|
| 105 | |
|---|
| 106 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
|---|
| 107 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
|---|
| 108 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
|---|
| 109 | AC_MSG_RESULT([$]{ac_t:- |
|---|
| 110 | }[$]am_cv_proto_iconv) |
|---|
| 111 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
|---|
| 112 | [Define as const if the declaration of iconv() needs const.]) |
|---|
| 113 | fi |
|---|
| 114 | ]) |
|---|
| 115 | |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | AC_DEFUN([AC_LIB_PROG_LD_GNU], |
|---|
| 128 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
|---|
| 129 | [ |
|---|
| 130 | case `$LD -v 2>&1 </dev/null` in |
|---|
| 131 | *GNU* | *'with BFD'*) |
|---|
| 132 | acl_cv_prog_gnu_ld=yes ;; |
|---|
| 133 | *) |
|---|
| 134 | acl_cv_prog_gnu_ld=no ;; |
|---|
| 135 | esac]) |
|---|
| 136 | with_gnu_ld=$acl_cv_prog_gnu_ld |
|---|
| 137 | ]) |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | AC_DEFUN([AC_LIB_PROG_LD], |
|---|
| 141 | [AC_ARG_WITH(gnu-ld, |
|---|
| 142 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
|---|
| 143 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
|---|
| 144 | AC_REQUIRE([AC_PROG_CC]) |
|---|
| 145 | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | if test "${PATH_SEPARATOR+set}" != set; then |
|---|
| 149 | echo " |
|---|
| 150 | echo "exit 0" >>conf$$.sh |
|---|
| 151 | chmod +x conf$$.sh |
|---|
| 152 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
|---|
| 153 | PATH_SEPARATOR=';' |
|---|
| 154 | else |
|---|
| 155 | PATH_SEPARATOR=: |
|---|
| 156 | fi |
|---|
| 157 | rm -f conf$$.sh |
|---|
| 158 | fi |
|---|
| 159 | ac_prog=ld |
|---|
| 160 | if test "$GCC" = yes; then |
|---|
| 161 | |
|---|
| 162 | AC_MSG_CHECKING([for ld used by GCC]) |
|---|
| 163 | case $host in |
|---|
| 164 | *-*-mingw*) |
|---|
| 165 | |
|---|
| 166 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
|---|
| 167 | *) |
|---|
| 168 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
|---|
| 169 | esac |
|---|
| 170 | case $ac_prog in |
|---|
| 171 | |
|---|
| 172 | [[\\/]* | [A-Za-z]:[\\/]*)] |
|---|
| 173 | [re_direlt='/[^/][^/]*/\.\./'] |
|---|
| 174 | |
|---|
| 175 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
|---|
| 176 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
|---|
| 177 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
|---|
| 178 | done |
|---|
| 179 | test -z "$LD" && LD="$ac_prog" |
|---|
| 180 | ;; |
|---|
| 181 | "") |
|---|
| 182 | |
|---|
| 183 | ac_prog=ld |
|---|
| 184 | ;; |
|---|
| 185 | *) |
|---|
| 186 | |
|---|
| 187 | with_gnu_ld=unknown |
|---|
| 188 | ;; |
|---|
| 189 | esac |
|---|
| 190 | elif test "$with_gnu_ld" = yes; then |
|---|
| 191 | AC_MSG_CHECKING([for GNU ld]) |
|---|
| 192 | else |
|---|
| 193 | AC_MSG_CHECKING([for non-GNU ld]) |
|---|
| 194 | fi |
|---|
| 195 | AC_CACHE_VAL(acl_cv_path_LD, |
|---|
| 196 | [if test -z "$LD"; then |
|---|
| 197 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
|---|
| 198 | for ac_dir in $PATH; do |
|---|
| 199 | test -z "$ac_dir" && ac_dir=. |
|---|
| 200 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
|---|
| 201 | acl_cv_path_LD="$ac_dir/$ac_prog" |
|---|
| 202 | |
|---|
| 203 | |
|---|
| 204 | |
|---|
| 205 | case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
|---|
| 206 | *GNU* | *'with BFD'*) |
|---|
| 207 | test "$with_gnu_ld" != no && break ;; |
|---|
| 208 | *) |
|---|
| 209 | test "$with_gnu_ld" != yes && break ;; |
|---|
| 210 | esac |
|---|
| 211 | fi |
|---|
| 212 | done |
|---|
| 213 | IFS="$ac_save_ifs" |
|---|
| 214 | else |
|---|
| 215 | acl_cv_path_LD="$LD" |
|---|
| 216 | fi]) |
|---|
| 217 | LD="$acl_cv_path_LD" |
|---|
| 218 | if test -n "$LD"; then |
|---|
| 219 | AC_MSG_RESULT($LD) |
|---|
| 220 | else |
|---|
| 221 | AC_MSG_RESULT(no) |
|---|
| 222 | fi |
|---|
| 223 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
|---|
| 224 | AC_LIB_PROG_LD_GNU |
|---|
| 225 | ]) |
|---|
| 226 | |
|---|
| 227 | |
|---|
| 228 | |
|---|
| 229 | |
|---|
| 230 | |
|---|
| 231 | |
|---|
| 232 | |
|---|
| 233 | |
|---|
| 234 | |
|---|
| 235 | AC_PREREQ(2.50) |
|---|
| 236 | |
|---|
| 237 | |
|---|
| 238 | |
|---|
| 239 | |
|---|
| 240 | |
|---|
| 241 | AC_DEFUN([AC_LIB_LINKFLAGS], |
|---|
| 242 | [ |
|---|
| 243 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 244 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 245 | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 246 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 247 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 248 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
|---|
| 249 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 250 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
|---|
| 251 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
|---|
| 252 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
|---|
| 253 | ]) |
|---|
| 254 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
|---|
| 255 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
|---|
| 256 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
|---|
| 257 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 258 | AC_SUBST([LIB]NAME) |
|---|
| 259 | AC_SUBST([LTLIB]NAME) |
|---|
| 260 | |
|---|
| 261 | |
|---|
| 262 | HAVE_LIB[]NAME=yes |
|---|
| 263 | undefine([Name]) |
|---|
| 264 | undefine([NAME]) |
|---|
| 265 | ]) |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | |
|---|
| 269 | |
|---|
| 270 | |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | |
|---|
| 274 | |
|---|
| 275 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
|---|
| 276 | [ |
|---|
| 277 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 278 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 279 | define([Name],[translit([$1],[./-], [___])]) |
|---|
| 280 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 281 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 282 | |
|---|
| 283 | |
|---|
| 284 | |
|---|
| 285 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|---|
| 286 | |
|---|
| 287 | |
|---|
| 288 | |
|---|
| 289 | |
|---|
| 290 | ac_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 291 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|---|
| 292 | |
|---|
| 293 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
|---|
| 294 | ac_save_LIBS="$LIBS" |
|---|
| 295 | LIBS="$LIBS $LIB[]NAME" |
|---|
| 296 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
|---|
| 297 | LIBS="$ac_save_LIBS" |
|---|
| 298 | ]) |
|---|
| 299 | if test "$ac_cv_lib[]Name" = yes; then |
|---|
| 300 | HAVE_LIB[]NAME=yes |
|---|
| 301 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
|---|
| 302 | AC_MSG_CHECKING([how to link with lib[]$1]) |
|---|
| 303 | AC_MSG_RESULT([$LIB[]NAME]) |
|---|
| 304 | else |
|---|
| 305 | HAVE_LIB[]NAME=no |
|---|
| 306 | |
|---|
| 307 | |
|---|
| 308 | CPPFLAGS="$ac_save_CPPFLAGS" |
|---|
| 309 | LIB[]NAME= |
|---|
| 310 | LTLIB[]NAME= |
|---|
| 311 | fi |
|---|
| 312 | AC_SUBST([HAVE_LIB]NAME) |
|---|
| 313 | AC_SUBST([LIB]NAME) |
|---|
| 314 | AC_SUBST([LTLIB]NAME) |
|---|
| 315 | undefine([Name]) |
|---|
| 316 | undefine([NAME]) |
|---|
| 317 | ]) |
|---|
| 318 | |
|---|
| 319 | |
|---|
| 320 | |
|---|
| 321 | |
|---|
| 322 | AC_DEFUN([AC_LIB_RPATH], |
|---|
| 323 | [ |
|---|
| 324 | |
|---|
| 325 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) |
|---|
| 326 | AC_REQUIRE([AC_PROG_CC]) |
|---|
| 327 | AC_REQUIRE([AC_LIB_PROG_LD]) |
|---|
| 328 | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 329 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) |
|---|
| 330 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
|---|
| 331 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
|---|
| 332 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
|---|
| 333 | . ./conftest.sh |
|---|
| 334 | rm -f ./conftest.sh |
|---|
| 335 | acl_cv_rpath=done |
|---|
| 336 | ]) |
|---|
| 337 | wl="$acl_cv_wl" |
|---|
| 338 | libext="$acl_cv_libext" |
|---|
| 339 | shlibext="$acl_cv_shlibext" |
|---|
| 340 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
|---|
| 341 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
|---|
| 342 | hardcode_direct="$acl_cv_hardcode_direct" |
|---|
| 343 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
|---|
| 344 | |
|---|
| 345 | AC_ARG_ENABLE(rpath, |
|---|
| 346 | [ --disable-rpath do not hardcode runtime library paths], |
|---|
| 347 | :, enable_rpath=yes) |
|---|
| 348 | ]) |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | |
|---|
| 352 | |
|---|
| 353 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
|---|
| 354 | [ |
|---|
| 355 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
|---|
| 356 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|---|
| 357 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|---|
| 358 | |
|---|
| 359 | use_additional=yes |
|---|
| 360 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 361 | eval additional_includedir=\"$includedir\" |
|---|
| 362 | eval additional_libdir=\"$libdir\" |
|---|
| 363 | ]) |
|---|
| 364 | AC_LIB_ARG_WITH([lib$1-prefix], |
|---|
| 365 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
|---|
| 366 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
|---|
| 367 | [ |
|---|
| 368 | if test "X$withval" = "Xno"; then |
|---|
| 369 | use_additional=no |
|---|
| 370 | else |
|---|
| 371 | if test "X$withval" = "X"; then |
|---|
| 372 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 373 | eval additional_includedir=\"$includedir\" |
|---|
| 374 | eval additional_libdir=\"$libdir\" |
|---|
| 375 | ]) |
|---|
| 376 | else |
|---|
| 377 | additional_includedir="$withval/include" |
|---|
| 378 | additional_libdir="$withval/$acl_libdirstem" |
|---|
| 379 | fi |
|---|
| 380 | fi |
|---|
| 381 | ]) |
|---|
| 382 | |
|---|
| 383 | |
|---|
| 384 | LIB[]NAME= |
|---|
| 385 | LTLIB[]NAME= |
|---|
| 386 | INC[]NAME= |
|---|
| 387 | rpathdirs= |
|---|
| 388 | ltrpathdirs= |
|---|
| 389 | names_already_handled= |
|---|
| 390 | names_next_round='$1 $2' |
|---|
| 391 | while test -n "$names_next_round"; do |
|---|
| 392 | names_this_round="$names_next_round" |
|---|
| 393 | names_next_round= |
|---|
| 394 | for name in $names_this_round; do |
|---|
| 395 | already_handled= |
|---|
| 396 | for n in $names_already_handled; do |
|---|
| 397 | if test "$n" = "$name"; then |
|---|
| 398 | already_handled=yes |
|---|
| 399 | break |
|---|
| 400 | fi |
|---|
| 401 | done |
|---|
| 402 | if test -z "$already_handled"; then |
|---|
| 403 | names_already_handled="$names_already_handled $name" |
|---|
| 404 | |
|---|
| 405 | |
|---|
| 406 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
|---|
| 407 | eval value=\"\$HAVE_LIB$uppername\" |
|---|
| 408 | if test -n "$value"; then |
|---|
| 409 | if test "$value" = yes; then |
|---|
| 410 | eval value=\"\$LIB$uppername\" |
|---|
| 411 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
|---|
| 412 | eval value=\"\$LTLIB$uppername\" |
|---|
| 413 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
|---|
| 414 | else |
|---|
| 415 | |
|---|
| 416 | |
|---|
| 417 | : |
|---|
| 418 | fi |
|---|
| 419 | else |
|---|
| 420 | |
|---|
| 421 | |
|---|
| 422 | found_dir= |
|---|
| 423 | found_la= |
|---|
| 424 | found_so= |
|---|
| 425 | found_a= |
|---|
| 426 | if test $use_additional = yes; then |
|---|
| 427 | if test -n "$shlibext" \ |
|---|
| 428 | && { test -f "$additional_libdir/lib$name.$shlibext" \ |
|---|
| 429 | || { test "$shlibext" = dll \ |
|---|
| 430 | && test -f "$additional_libdir/lib$name.dll.a"; }; }; then |
|---|
| 431 | found_dir="$additional_libdir" |
|---|
| 432 | if test -f "$additional_libdir/lib$name.$shlibext"; then |
|---|
| 433 | found_so="$additional_libdir/lib$name.$shlibext" |
|---|
| 434 | else |
|---|
| 435 | found_so="$additional_libdir/lib$name.dll.a" |
|---|
| 436 | fi |
|---|
| 437 | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 438 | found_la="$additional_libdir/lib$name.la" |
|---|
| 439 | fi |
|---|
| 440 | else |
|---|
| 441 | if test -f "$additional_libdir/lib$name.$libext"; then |
|---|
| 442 | found_dir="$additional_libdir" |
|---|
| 443 | found_a="$additional_libdir/lib$name.$libext" |
|---|
| 444 | if test -f "$additional_libdir/lib$name.la"; then |
|---|
| 445 | found_la="$additional_libdir/lib$name.la" |
|---|
| 446 | fi |
|---|
| 447 | fi |
|---|
| 448 | fi |
|---|
| 449 | fi |
|---|
| 450 | if test "X$found_dir" = "X"; then |
|---|
| 451 | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 452 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 453 | case "$x" in |
|---|
| 454 | -L*) |
|---|
| 455 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
|---|
| 456 | if test -n "$shlibext" \ |
|---|
| 457 | && { test -f "$dir/lib$name.$shlibext" \ |
|---|
| 458 | || { test "$shlibext" = dll \ |
|---|
| 459 | && test -f "$dir/lib$name.dll.a"; }; }; then |
|---|
| 460 | found_dir="$dir" |
|---|
| 461 | if test -f "$dir/lib$name.$shlibext"; then |
|---|
| 462 | found_so="$dir/lib$name.$shlibext" |
|---|
| 463 | else |
|---|
| 464 | found_so="$dir/lib$name.dll.a" |
|---|
| 465 | fi |
|---|
| 466 | if test -f "$dir/lib$name.la"; then |
|---|
| 467 | found_la="$dir/lib$name.la" |
|---|
| 468 | fi |
|---|
| 469 | else |
|---|
| 470 | if test -f "$dir/lib$name.$libext"; then |
|---|
| 471 | found_dir="$dir" |
|---|
| 472 | found_a="$dir/lib$name.$libext" |
|---|
| 473 | if test -f "$dir/lib$name.la"; then |
|---|
| 474 | found_la="$dir/lib$name.la" |
|---|
| 475 | fi |
|---|
| 476 | fi |
|---|
| 477 | fi |
|---|
| 478 | ;; |
|---|
| 479 | esac |
|---|
| 480 | if test "X$found_dir" != "X"; then |
|---|
| 481 | break |
|---|
| 482 | fi |
|---|
| 483 | done |
|---|
| 484 | fi |
|---|
| 485 | if test "X$found_dir" != "X"; then |
|---|
| 486 | |
|---|
| 487 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 488 | if test "X$found_so" != "X"; then |
|---|
| 489 | |
|---|
| 490 | |
|---|
| 491 | |
|---|
| 492 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then |
|---|
| 493 | |
|---|
| 494 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 495 | else |
|---|
| 496 | |
|---|
| 497 | |
|---|
| 498 | |
|---|
| 499 | |
|---|
| 500 | haveit= |
|---|
| 501 | for x in $ltrpathdirs; do |
|---|
| 502 | if test "X$x" = "X$found_dir"; then |
|---|
| 503 | haveit=yes |
|---|
| 504 | break |
|---|
| 505 | fi |
|---|
| 506 | done |
|---|
| 507 | if test -z "$haveit"; then |
|---|
| 508 | ltrpathdirs="$ltrpathdirs $found_dir" |
|---|
| 509 | fi |
|---|
| 510 | |
|---|
| 511 | if test "$hardcode_direct" = yes; then |
|---|
| 512 | |
|---|
| 513 | |
|---|
| 514 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 515 | else |
|---|
| 516 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
|---|
| 517 | |
|---|
| 518 | |
|---|
| 519 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 520 | |
|---|
| 521 | |
|---|
| 522 | haveit= |
|---|
| 523 | for x in $rpathdirs; do |
|---|
| 524 | if test "X$x" = "X$found_dir"; then |
|---|
| 525 | haveit=yes |
|---|
| 526 | break |
|---|
| 527 | fi |
|---|
| 528 | done |
|---|
| 529 | if test -z "$haveit"; then |
|---|
| 530 | rpathdirs="$rpathdirs $found_dir" |
|---|
| 531 | fi |
|---|
| 532 | else |
|---|
| 533 | |
|---|
| 534 | |
|---|
| 535 | |
|---|
| 536 | haveit= |
|---|
| 537 | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 538 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 539 | if test "X$x" = "X-L$found_dir"; then |
|---|
| 540 | haveit=yes |
|---|
| 541 | break |
|---|
| 542 | fi |
|---|
| 543 | done |
|---|
| 544 | if test -z "$haveit"; then |
|---|
| 545 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
|---|
| 546 | fi |
|---|
| 547 | if test "$hardcode_minus_L" != no; then |
|---|
| 548 | dnl FIXME: Not sure whether we should use |
|---|
| 549 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
|---|
| 550 | dnl here. |
|---|
| 551 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|---|
| 552 | else |
|---|
| 553 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
|---|
| 554 | dnl here, because this doesn't fit in flags passed to the |
|---|
| 555 | |
|---|
| 556 | |
|---|
| 557 | |
|---|
| 558 | |
|---|
| 559 | |
|---|
| 560 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 561 | fi |
|---|
| 562 | fi |
|---|
| 563 | fi |
|---|
| 564 | fi |
|---|
| 565 | else |
|---|
| 566 | if test "X$found_a" != "X"; then |
|---|
| 567 | |
|---|
| 568 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
|---|
| 569 | else |
|---|
| 570 | |
|---|
| 571 | |
|---|
| 572 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
|---|
| 573 | fi |
|---|
| 574 | fi |
|---|
| 575 | |
|---|
| 576 | additional_includedir= |
|---|
| 577 | case "$found_dir" in |
|---|
| 578 | */$acl_libdirstem | */$acl_libdirstem/) |
|---|
| 579 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
|---|
| 580 | additional_includedir="$basedir/include" |
|---|
| 581 | ;; |
|---|
| 582 | esac |
|---|
| 583 | if test "X$additional_includedir" != "X"; then |
|---|
| 584 | |
|---|
| 585 | |
|---|
| 586 | |
|---|
| 587 | |
|---|
| 588 | |
|---|
| 589 | |
|---|
| 590 | |
|---|
| 591 | if test "X$additional_includedir" != "X/usr/include"; then |
|---|
| 592 | haveit= |
|---|
| 593 | if test "X$additional_includedir" = "X/usr/local/include"; then |
|---|
| 594 | if test -n "$GCC"; then |
|---|
| 595 | case $host_os in |
|---|
| 596 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
|---|
| 597 | esac |
|---|
| 598 | fi |
|---|
| 599 | fi |
|---|
| 600 | if test -z "$haveit"; then |
|---|
| 601 | for x in $CPPFLAGS $INC[]NAME; do |
|---|
| 602 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 603 | if test "X$x" = "X-I$additional_includedir"; then |
|---|
| 604 | haveit=yes |
|---|
| 605 | break |
|---|
| 606 | fi |
|---|
| 607 | done |
|---|
| 608 | if test -z "$haveit"; then |
|---|
| 609 | if test -d "$additional_includedir"; then |
|---|
| 610 | |
|---|
| 611 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
|---|
| 612 | fi |
|---|
| 613 | fi |
|---|
| 614 | fi |
|---|
| 615 | fi |
|---|
| 616 | fi |
|---|
| 617 | |
|---|
| 618 | if test -n "$found_la"; then |
|---|
| 619 | |
|---|
| 620 | |
|---|
| 621 | |
|---|
| 622 | save_libdir="$libdir" |
|---|
| 623 | case "$found_la" in |
|---|
| 624 | */* | *\\*) . "$found_la" ;; |
|---|
| 625 | *) . "./$found_la" ;; |
|---|
| 626 | esac |
|---|
| 627 | libdir="$save_libdir" |
|---|
| 628 | |
|---|
| 629 | for dep in $dependency_libs; do |
|---|
| 630 | case "$dep" in |
|---|
| 631 | -L*) |
|---|
| 632 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
|---|
| 633 | |
|---|
| 634 | |
|---|
| 635 | |
|---|
| 636 | |
|---|
| 637 | |
|---|
| 638 | |
|---|
| 639 | |
|---|
| 640 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
|---|
| 641 | haveit= |
|---|
| 642 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
|---|
| 643 | if test -n "$GCC"; then |
|---|
| 644 | case $host_os in |
|---|
| 645 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
|---|
| 646 | esac |
|---|
| 647 | fi |
|---|
| 648 | fi |
|---|
| 649 | if test -z "$haveit"; then |
|---|
| 650 | haveit= |
|---|
| 651 | for x in $LDFLAGS $LIB[]NAME; do |
|---|
| 652 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 653 | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 654 | haveit=yes |
|---|
| 655 | break |
|---|
| 656 | fi |
|---|
| 657 | done |
|---|
| 658 | if test -z "$haveit"; then |
|---|
| 659 | if test -d "$additional_libdir"; then |
|---|
| 660 | |
|---|
| 661 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
|---|
| 662 | fi |
|---|
| 663 | fi |
|---|
| 664 | haveit= |
|---|
| 665 | for x in $LDFLAGS $LTLIB[]NAME; do |
|---|
| 666 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 667 | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 668 | haveit=yes |
|---|
| 669 | break |
|---|
| 670 | fi |
|---|
| 671 | done |
|---|
| 672 | if test -z "$haveit"; then |
|---|
| 673 | if test -d "$additional_libdir"; then |
|---|
| 674 | |
|---|
| 675 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
|---|
| 676 | fi |
|---|
| 677 | fi |
|---|
| 678 | fi |
|---|
| 679 | fi |
|---|
| 680 | ;; |
|---|
| 681 | -R*) |
|---|
| 682 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
|---|
| 683 | if test "$enable_rpath" != no; then |
|---|
| 684 | |
|---|
| 685 | |
|---|
| 686 | haveit= |
|---|
| 687 | for x in $rpathdirs; do |
|---|
| 688 | if test "X$x" = "X$dir"; then |
|---|
| 689 | haveit=yes |
|---|
| 690 | break |
|---|
| 691 | fi |
|---|
| 692 | done |
|---|
| 693 | if test -z "$haveit"; then |
|---|
| 694 | rpathdirs="$rpathdirs $dir" |
|---|
| 695 | fi |
|---|
| 696 | |
|---|
| 697 | |
|---|
| 698 | haveit= |
|---|
| 699 | for x in $ltrpathdirs; do |
|---|
| 700 | if test "X$x" = "X$dir"; then |
|---|
| 701 | haveit=yes |
|---|
| 702 | break |
|---|
| 703 | fi |
|---|
| 704 | done |
|---|
| 705 | if test -z "$haveit"; then |
|---|
| 706 | ltrpathdirs="$ltrpathdirs $dir" |
|---|
| 707 | fi |
|---|
| 708 | fi |
|---|
| 709 | ;; |
|---|
| 710 | -l*) |
|---|
| 711 | |
|---|
| 712 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
|---|
| 713 | ;; |
|---|
| 714 | *.la) |
|---|
| 715 | |
|---|
| 716 | |
|---|
| 717 | |
|---|
| 718 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
|---|
| 719 | ;; |
|---|
| 720 | *) |
|---|
| 721 | |
|---|
| 722 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
|---|
| 723 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
|---|
| 724 | ;; |
|---|
| 725 | esac |
|---|
| 726 | done |
|---|
| 727 | fi |
|---|
| 728 | else |
|---|
| 729 | |
|---|
| 730 | |
|---|
| 731 | |
|---|
| 732 | |
|---|
| 733 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|---|
| 734 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
|---|
| 735 | fi |
|---|
| 736 | fi |
|---|
| 737 | fi |
|---|
| 738 | done |
|---|
| 739 | done |
|---|
| 740 | if test "X$rpathdirs" != "X"; then |
|---|
| 741 | if test -n "$hardcode_libdir_separator"; then |
|---|
| 742 | |
|---|
| 743 | |
|---|
| 744 | |
|---|
| 745 | alldirs= |
|---|
| 746 | for found_dir in $rpathdirs; do |
|---|
| 747 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
|---|
| 748 | done |
|---|
| 749 | |
|---|
| 750 | acl_save_libdir="$libdir" |
|---|
| 751 | libdir="$alldirs" |
|---|
| 752 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 753 | libdir="$acl_save_libdir" |
|---|
| 754 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 755 | else |
|---|
| 756 | |
|---|
| 757 | for found_dir in $rpathdirs; do |
|---|
| 758 | acl_save_libdir="$libdir" |
|---|
| 759 | libdir="$found_dir" |
|---|
| 760 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 761 | libdir="$acl_save_libdir" |
|---|
| 762 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|---|
| 763 | done |
|---|
| 764 | fi |
|---|
| 765 | fi |
|---|
| 766 | if test "X$ltrpathdirs" != "X"; then |
|---|
| 767 | |
|---|
| 768 | |
|---|
| 769 | for found_dir in $ltrpathdirs; do |
|---|
| 770 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
|---|
| 771 | done |
|---|
| 772 | fi |
|---|
| 773 | ]) |
|---|
| 774 | |
|---|
| 775 | |
|---|
| 776 | |
|---|
| 777 | |
|---|
| 778 | |
|---|
| 779 | AC_DEFUN([AC_LIB_APPENDTOVAR], |
|---|
| 780 | [ |
|---|
| 781 | for element in [$2]; do |
|---|
| 782 | haveit= |
|---|
| 783 | for x in $[$1]; do |
|---|
| 784 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 785 | if test "X$x" = "X$element"; then |
|---|
| 786 | haveit=yes |
|---|
| 787 | break |
|---|
| 788 | fi |
|---|
| 789 | done |
|---|
| 790 | if test -z "$haveit"; then |
|---|
| 791 | [$1]="${[$1]}${[$1]:+ }$element" |
|---|
| 792 | fi |
|---|
| 793 | done |
|---|
| 794 | ]) |
|---|
| 795 | |
|---|
| 796 | |
|---|
| 797 | |
|---|
| 798 | |
|---|
| 799 | |
|---|
| 800 | |
|---|
| 801 | |
|---|
| 802 | |
|---|
| 803 | AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], |
|---|
| 804 | [ |
|---|
| 805 | AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 806 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
|---|
| 807 | $1= |
|---|
| 808 | if test "$enable_rpath" != no; then |
|---|
| 809 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
|---|
| 810 | |
|---|
| 811 | |
|---|
| 812 | rpathdirs= |
|---|
| 813 | next= |
|---|
| 814 | for opt in $2; do |
|---|
| 815 | if test -n "$next"; then |
|---|
| 816 | dir="$next" |
|---|
| 817 | |
|---|
| 818 | if test "X$dir" != "X/usr/$acl_libdirstem"; then |
|---|
| 819 | rpathdirs="$rpathdirs $dir" |
|---|
| 820 | fi |
|---|
| 821 | next= |
|---|
| 822 | else |
|---|
| 823 | case $opt in |
|---|
| 824 | -L) next=yes ;; |
|---|
| 825 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
|---|
| 826 | |
|---|
| 827 | if test "X$dir" != "X/usr/$acl_libdirstem"; then |
|---|
| 828 | rpathdirs="$rpathdirs $dir" |
|---|
| 829 | fi |
|---|
| 830 | next= ;; |
|---|
| 831 | *) next= ;; |
|---|
| 832 | esac |
|---|
| 833 | fi |
|---|
| 834 | done |
|---|
| 835 | if test "X$rpathdirs" != "X"; then |
|---|
| 836 | if test -n ""$3""; then |
|---|
| 837 | |
|---|
| 838 | for dir in $rpathdirs; do |
|---|
| 839 | $1="${$1}${$1:+ }-R$dir" |
|---|
| 840 | done |
|---|
| 841 | else |
|---|
| 842 | |
|---|
| 843 | if test -n "$hardcode_libdir_separator"; then |
|---|
| 844 | |
|---|
| 845 | |
|---|
| 846 | alldirs= |
|---|
| 847 | for dir in $rpathdirs; do |
|---|
| 848 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" |
|---|
| 849 | done |
|---|
| 850 | acl_save_libdir="$libdir" |
|---|
| 851 | libdir="$alldirs" |
|---|
| 852 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 853 | libdir="$acl_save_libdir" |
|---|
| 854 | $1="$flag" |
|---|
| 855 | else |
|---|
| 856 | |
|---|
| 857 | for dir in $rpathdirs; do |
|---|
| 858 | acl_save_libdir="$libdir" |
|---|
| 859 | libdir="$dir" |
|---|
| 860 | eval flag=\"$hardcode_libdir_flag_spec\" |
|---|
| 861 | libdir="$acl_save_libdir" |
|---|
| 862 | $1="${$1}${$1:+ }$flag" |
|---|
| 863 | done |
|---|
| 864 | fi |
|---|
| 865 | fi |
|---|
| 866 | fi |
|---|
| 867 | fi |
|---|
| 868 | fi |
|---|
| 869 | AC_SUBST([$1]) |
|---|
| 870 | ]) |
|---|
| 871 | |
|---|
| 872 | |
|---|
| 873 | |
|---|
| 874 | |
|---|
| 875 | |
|---|
| 876 | |
|---|
| 877 | |
|---|
| 878 | |
|---|
| 879 | |
|---|
| 880 | |
|---|
| 881 | |
|---|
| 882 | |
|---|
| 883 | ifdef([AC_HELP_STRING], |
|---|
| 884 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
|---|
| 885 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
|---|
| 886 | |
|---|
| 887 | |
|---|
| 888 | |
|---|
| 889 | |
|---|
| 890 | |
|---|
| 891 | |
|---|
| 892 | |
|---|
| 893 | AC_DEFUN([AC_LIB_PREFIX], |
|---|
| 894 | [ |
|---|
| 895 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
|---|
| 896 | AC_REQUIRE([AC_PROG_CC]) |
|---|
| 897 | AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 898 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
|---|
| 899 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 900 | |
|---|
| 901 | use_additional=yes |
|---|
| 902 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 903 | eval additional_includedir=\"$includedir\" |
|---|
| 904 | eval additional_libdir=\"$libdir\" |
|---|
| 905 | ]) |
|---|
| 906 | AC_LIB_ARG_WITH([lib-prefix], |
|---|
| 907 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
|---|
| 908 | --without-lib-prefix don't search for libraries in includedir and libdir], |
|---|
| 909 | [ |
|---|
| 910 | if test "X$withval" = "Xno"; then |
|---|
| 911 | use_additional=no |
|---|
| 912 | else |
|---|
| 913 | if test "X$withval" = "X"; then |
|---|
| 914 | AC_LIB_WITH_FINAL_PREFIX([ |
|---|
| 915 | eval additional_includedir=\"$includedir\" |
|---|
| 916 | eval additional_libdir=\"$libdir\" |
|---|
| 917 | ]) |
|---|
| 918 | else |
|---|
| 919 | additional_includedir="$withval/include" |
|---|
| 920 | additional_libdir="$withval/$acl_libdirstem" |
|---|
| 921 | fi |
|---|
| 922 | fi |
|---|
| 923 | ]) |
|---|
| 924 | if test $use_additional = yes; then |
|---|
| 925 | |
|---|
| 926 | |
|---|
| 927 | |
|---|
| 928 | |
|---|
| 929 | |
|---|
| 930 | |
|---|
| 931 | if test "X$additional_includedir" != "X/usr/include"; then |
|---|
| 932 | haveit= |
|---|
| 933 | for x in $CPPFLAGS; do |
|---|
| 934 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 935 | if test "X$x" = "X-I$additional_includedir"; then |
|---|
| 936 | haveit=yes |
|---|
| 937 | break |
|---|
| 938 | fi |
|---|
| 939 | done |
|---|
| 940 | if test -z "$haveit"; then |
|---|
| 941 | if test "X$additional_includedir" = "X/usr/local/include"; then |
|---|
| 942 | if test -n "$GCC"; then |
|---|
| 943 | case $host_os in |
|---|
| 944 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
|---|
| 945 | esac |
|---|
| 946 | fi |
|---|
| 947 | fi |
|---|
| 948 | if test -z "$haveit"; then |
|---|
| 949 | if test -d "$additional_includedir"; then |
|---|
| 950 | |
|---|
| 951 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
|---|
| 952 | fi |
|---|
| 953 | fi |
|---|
| 954 | fi |
|---|
| 955 | fi |
|---|
| 956 | |
|---|
| 957 | |
|---|
| 958 | |
|---|
| 959 | |
|---|
| 960 | |
|---|
| 961 | |
|---|
| 962 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then |
|---|
| 963 | haveit= |
|---|
| 964 | for x in $LDFLAGS; do |
|---|
| 965 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|---|
| 966 | if test "X$x" = "X-L$additional_libdir"; then |
|---|
| 967 | haveit=yes |
|---|
| 968 | break |
|---|
| 969 | fi |
|---|
| 970 | done |
|---|
| 971 | if test -z "$haveit"; then |
|---|
| 972 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then |
|---|
| 973 | if test -n "$GCC"; then |
|---|
| 974 | case $host_os in |
|---|
| 975 | linux*) haveit=yes;; |
|---|
| 976 | esac |
|---|
| 977 | fi |
|---|
| 978 | fi |
|---|
| 979 | if test -z "$haveit"; then |
|---|
| 980 | if test -d "$additional_libdir"; then |
|---|
| 981 | |
|---|
| 982 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
|---|
| 983 | fi |
|---|
| 984 | fi |
|---|
| 985 | fi |
|---|
| 986 | fi |
|---|
| 987 | fi |
|---|
| 988 | ]) |
|---|
| 989 | |
|---|
| 990 | |
|---|
| 991 | |
|---|
| 992 | |
|---|
| 993 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
|---|
| 994 | [ |
|---|
| 995 | |
|---|
| 996 | |
|---|
| 997 | if test "X$prefix" = "XNONE"; then |
|---|
| 998 | acl_final_prefix="$ac_default_prefix" |
|---|
| 999 | else |
|---|
| 1000 | acl_final_prefix="$prefix" |
|---|
| 1001 | fi |
|---|
|
|---|