|
version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
|
Line 1
|
Line 1
|
| # lib-link.m4 serial 20 (gettext-0.18) | # lib-link.m4 serial 26 (gettext-0.18.2) |
| dnl Copyright (C) 2001-2009 Free Software Foundation, Inc. | dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. |
| dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
| dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
| dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
|
Line 18 AC_DEFUN([AC_LIB_LINKFLAGS],
|
Line 18 AC_DEFUN([AC_LIB_LINKFLAGS],
|
| [ |
[ |
| AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| AC_REQUIRE([AC_LIB_RPATH]) |
AC_REQUIRE([AC_LIB_RPATH]) |
| pushdef([Name],[translit([$1],[./-], [___])]) | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
| pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
| AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
| ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
|
Line 58 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
Line 58 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
| [ |
[ |
| AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
| AC_REQUIRE([AC_LIB_RPATH]) |
AC_REQUIRE([AC_LIB_RPATH]) |
| pushdef([Name],[translit([$1],[./-], [___])]) | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
| pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| |
|
| dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
| dnl accordingly. |
dnl accordingly. |
|
Line 74 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
Line 74 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
| |
|
| AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
| ac_save_LIBS="$LIBS" |
ac_save_LIBS="$LIBS" |
| LIBS="$LIBS $LIB[]NAME" | dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, |
| AC_TRY_LINK([$3], [$4], | dnl because these -l options might require -L options that are present in |
| | dnl LIBS. -l options benefit only from the -L options listed before it. |
| | dnl Otherwise, add it to the front of LIBS, because it may be a static |
| | dnl library that depends on another static library that is present in LIBS. |
| | dnl Static libraries benefit only from the static libraries listed after |
| | dnl it. |
| | case " $LIB[]NAME" in |
| | *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; |
| | *) LIBS="$LIB[]NAME $LIBS" ;; |
| | esac |
| | AC_LINK_IFELSE( |
| | [AC_LANG_PROGRAM([[$3]], [[$4]])], |
| [ac_cv_lib[]Name=yes], |
[ac_cv_lib[]Name=yes], |
| [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) |
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) |
| LIBS="$ac_save_LIBS" |
LIBS="$ac_save_LIBS" |
|
Line 105 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
Line 116 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
| dnl Determine the platform dependent parameters needed to use rpath: |
dnl Determine the platform dependent parameters needed to use rpath: |
| dnl acl_libext, |
dnl acl_libext, |
| dnl acl_shlibext, |
dnl acl_shlibext, |
| |
dnl acl_libname_spec, |
| |
dnl acl_library_names_spec, |
| dnl acl_hardcode_libdir_flag_spec, |
dnl acl_hardcode_libdir_flag_spec, |
| dnl acl_hardcode_libdir_separator, |
dnl acl_hardcode_libdir_separator, |
| dnl acl_hardcode_direct, |
dnl acl_hardcode_direct, |
|
Line 147 dnl package. This declaration must occur before an AC_
|
Line 160 dnl package. This declaration must occur before an AC_
|
| dnl macro call that searches for libname. |
dnl macro call that searches for libname. |
| AC_DEFUN([AC_LIB_FROMPACKAGE], |
AC_DEFUN([AC_LIB_FROMPACKAGE], |
| [ |
[ |
| pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| define([acl_frompackage_]NAME, [$2]) |
define([acl_frompackage_]NAME, [$2]) |
| popdef([NAME]) |
popdef([NAME]) |
| pushdef([PACK],[$2]) |
pushdef([PACK],[$2]) |
| pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| define([acl_libsinpackage_]PACKUP, |
define([acl_libsinpackage_]PACKUP, |
| m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) | m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) |
| popdef([PACKUP]) |
popdef([PACKUP]) |
| popdef([PACK]) |
popdef([PACK]) |
| ]) |
]) |
|
Line 168 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
Line 181 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
| AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
| [ |
[ |
| AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
| pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) |
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) |
| pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], |
| [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
| pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) |
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) |
| dnl Autoconf >= 2.61 supports dots in --with options. |
dnl Autoconf >= 2.61 supports dots in --with options. |
| pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) |
| dnl By default, look in $includedir and $libdir. |
dnl By default, look in $includedir and $libdir. |
| use_additional=yes |
use_additional=yes |
| AC_LIB_WITH_FINAL_PREFIX([ |
AC_LIB_WITH_FINAL_PREFIX([ |
|
Line 232 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
Line 245 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
| names_already_handled="$names_already_handled $name" |
names_already_handled="$names_already_handled $name" |
| dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
| dnl or AC_LIB_HAVE_LINKFLAGS call. |
dnl or AC_LIB_HAVE_LINKFLAGS call. |
| uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` |
| eval value=\"\$HAVE_LIB$uppername\" |
eval value=\"\$HAVE_LIB$uppername\" |
| if test -n "$value"; then |
if test -n "$value"; then |
| if test "$value" = yes; then |
if test "$value" = yes; then |