823 |
# libC (AIX C++ library), which obviously doesn't included in libraries |
# libC (AIX C++ library), which obviously doesn't included in libraries |
824 |
# list by gcc. This cause undefined symbols with -static flags. |
# list by gcc. This cause undefined symbols with -static flags. |
825 |
# This hack allows C programs to be linked with "-static -ldl", but |
# This hack allows C programs to be linked with "-static -ldl", but |
826 |
# we not sure about C++ programs. |
# not sure about C++ programs. |
827 |
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
828 |
;; |
;; |
829 |
amigaos*) |
amigaos*) |
1415 |
;; |
;; |
1416 |
|
|
1417 |
aix4* | aix5*) |
aix4* | aix5*) |
1418 |
|
if test "$host_cpu" = ia64; then |
1419 |
|
# On IA64, the linker does run time linking by default, so we don't |
1420 |
|
# have to do anything special. |
1421 |
|
aix_use_runtimelinking=no |
1422 |
|
exp_sym_flag='-Bexport' |
1423 |
|
no_entry_flag="" |
1424 |
|
else |
1425 |
|
aix_use_runtimelinking=no |
1426 |
|
|
1427 |
|
# Test if we are trying to use run time linking or normal |
1428 |
|
# AIX style linking. If -brtl is somewhere in LDFLAGS, we |
1429 |
|
# need to do runtime linking. |
1430 |
|
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
1431 |
|
for ld_flag in $LDFLAGS; do |
1432 |
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
1433 |
|
aix_use_runtimelinking=yes |
1434 |
|
break |
1435 |
|
fi |
1436 |
|
done |
1437 |
|
esac |
1438 |
|
|
1439 |
|
exp_sym_flag='-bexport' |
1440 |
|
no_entry_flag='-bnoentry' |
1441 |
|
fi |
1442 |
|
|
1443 |
# When large executables or shared objects are built, AIX ld can |
# When large executables or shared objects are built, AIX ld can |
1444 |
# have problems creating the table of contents. If linking a library |
# have problems creating the table of contents. If linking a library |
1445 |
# or program results in "error TOC overflow" add -mminimal-toc to |
# or program results in "error TOC overflow" add -mminimal-toc to |
1446 |
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
1447 |
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
1448 |
|
|
1449 |
|
hardcode_direct=yes |
1450 |
archive_cmds='' |
archive_cmds='' |
1451 |
hardcode_libdir_separator=':' |
hardcode_libdir_separator=':' |
1452 |
if test "$GCC" = yes; then |
if test "$GCC" = yes; then |
1453 |
collect2name=`${CC} -print-prog-name=collect2` |
case $host_os in aix4.[012]|aix4.[012].*) |
1454 |
if test -f "$collect2name" && \ |
collect2name=`${CC} -print-prog-name=collect2` |
1455 |
strings "$collect2name" | grep resolve_lib_name >/dev/null |
if test -f "$collect2name" && \ |
1456 |
then |
strings "$collect2name" | grep resolve_lib_name >/dev/null |
1457 |
# We have reworked collect2 |
then |
1458 |
hardcode_direct=yes |
# We have reworked collect2 |
1459 |
else |
hardcode_direct=yes |
1460 |
# We have old collect2 |
else |
1461 |
hardcode_direct=unsupported |
# We have old collect2 |
1462 |
# It fails to find uninstalled libraries when the uninstalled |
hardcode_direct=unsupported |
1463 |
# path is not listed in the libpath. Setting hardcode_minus_L |
# It fails to find uninstalled libraries when the uninstalled |
1464 |
# to unsupported forces relinking |
# path is not listed in the libpath. Setting hardcode_minus_L |
1465 |
hardcode_minus_L=yes |
# to unsupported forces relinking |
1466 |
hardcode_libdir_flag_spec='-L$libdir' |
hardcode_minus_L=yes |
1467 |
hardcode_libdir_separator= |
hardcode_libdir_flag_spec='-L$libdir' |
1468 |
fi |
hardcode_libdir_separator= |
1469 |
|
fi |
1470 |
|
esac |
1471 |
|
|
1472 |
shared_flag='-shared' |
shared_flag='-shared' |
1473 |
else |
else |
1474 |
|
# not using gcc |
1475 |
if test "$host_cpu" = ia64; then |
if test "$host_cpu" = ia64; then |
1476 |
shared_flag='-G' |
shared_flag='${wl}-G' |
1477 |
else |
else |
1478 |
shared_flag='${wl}-bM:SRE' |
if test "$aix_use_runtimelinking" = yes; then |
1479 |
|
shared_flag='${wl}-G' |
1480 |
|
else |
1481 |
|
shared_flag='${wl}-bM:SRE' |
1482 |
|
fi |
1483 |
fi |
fi |
|
hardcode_direct=yes |
|
1484 |
fi |
fi |
1485 |
|
|
|
if test "$host_cpu" = ia64; then |
|
|
# On IA64, the linker does run time linking by default, so we don't |
|
|
# have to do anything special. |
|
|
aix_use_runtimelinking=no |
|
|
exp_sym_flag='-Bexport' |
|
|
no_entry_flag="" |
|
|
else |
|
|
# Test if we are trying to use run time linking, or normal AIX style linking. |
|
|
# If -brtl is somewhere in LDFLAGS, we need to do run time linking. |
|
|
aix_use_runtimelinking=no |
|
|
for ld_flag in $LDFLAGS; do |
|
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then |
|
|
aix_use_runtimelinking=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
exp_sym_flag='-bexport' |
|
|
no_entry_flag='-bnoentry' |
|
|
fi |
|
1486 |
# It seems that -bexpall can do strange things, so it is better to |
# It seems that -bexpall can do strange things, so it is better to |
1487 |
# generate a list of symbols to export. |
# generate a list of symbols to export. |
1488 |
always_export_symbols=yes |
always_export_symbols=yes |
1489 |
if test "$aix_use_runtimelinking" = yes; then |
if test "$aix_use_runtimelinking" = yes; then |
1490 |
|
# Warning - without using the other runtime loading flags (-brtl), |
1491 |
|
# -berok will link without error, but may produce a broken library. |
1492 |
|
allow_undefined_flag='-berok' |
1493 |
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
1494 |
allow_undefined_flag=' -Wl,-G' |
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" |
|
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" |
|
1495 |
else |
else |
1496 |
if test "$host_cpu" = ia64; then |
if test "$host_cpu" = ia64; then |
1497 |
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
1498 |
allow_undefined_flag="-znodefs" |
allow_undefined_flag="-z nodefs" |
1499 |
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" |
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" |
1500 |
else |
else |
1501 |
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
1502 |
# Warning - without using the other run time loading flags, -berok will |
# Warning - without using the other run time loading flags, |
1503 |
# link without error, but may produce a broken library. |
# -berok will link without error, but may produce a broken library. |
1504 |
allow_undefined_flag='${wl}-berok' |
allow_undefined_flag='${wl}-berok' |
1505 |
# This is a bit strange, but is similar to how AIX traditionally builds |
# This is a bit strange, but is similar to how AIX traditionally builds |
1506 |
# it's shared libraries. |
# it's shared libraries. |
1897 |
fi |
fi |
1898 |
;; |
;; |
1899 |
esac |
esac |
1900 |
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
# AIX (on Power*) has no versioning support, so currently we can |
1901 |
# soname into executable. Probably we can add versioning support to |
# not hardcode correct soname into executable. Probably we can |
1902 |
# collect2, so additional links can be useful in future. |
# add versioning support to collect2, so additional links can |
1903 |
|
# be useful in future. |
1904 |
if test "$aix_use_runtimelinking" = yes; then |
if test "$aix_use_runtimelinking" = yes; then |
1905 |
# If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of |
# If using run time linking (on AIX 4.2 or later) use lib<name>.so |
1906 |
# lib<name>.a to let people know that these are not typical AIX shared libraries. |
# instead of lib<name>.a to let people know that these are not |
1907 |
|
# typical AIX shared libraries. |
1908 |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
1909 |
else |
else |
1910 |
# We preserve .a as extension for shared libraries through AIX4.2 |
# We preserve .a as extension for shared libraries through AIX4.2 |