aboutsummaryrefslogtreecommitdiff
path: root/m4/lib-link.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/lib-link.m4')
-rw-r--r--m4/lib-link.m445
1 files changed, 24 insertions, 21 deletions
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index c73bd8e..d963149 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
1# lib-link.m4 serial 21 (gettext-0.18) 1# lib-link.m4 serial 26 (gettext-0.18.2)
2dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
18[ 18[
19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20 AC_REQUIRE([AC_LIB_RPATH]) 20 AC_REQUIRE([AC_LIB_RPATH])
21 pushdef([Name],[translit([$1],[./-], [___])]) 21 pushdef([Name],[m4_translit([$1],[./+-], [____])])
22 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 22 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 25 AC_LIB_LINKFLAGS_BODY([$1], [$2])
26 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 26 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -58,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
58[ 58[
59 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 59 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
60 AC_REQUIRE([AC_LIB_RPATH]) 60 AC_REQUIRE([AC_LIB_RPATH])
61 pushdef([Name],[translit([$1],[./-], [___])]) 61 pushdef([Name],[m4_translit([$1],[./+-], [____])])
62 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 62 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
63 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 63 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
64 64
65 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 65 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
66 dnl accordingly. 66 dnl accordingly.
@@ -68,7 +68,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
68 68
69 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 69 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
70 dnl because if the user has installed lib[]Name and not disabled its use 70 dnl because if the user has installed lib[]Name and not disabled its use
71 dnl via --without-lib[]Name-prefix, he wants to use it. 71 dnl via --without-lib[]Name-prefix, they want to use it.
72 ac_save_CPPFLAGS="$CPPFLAGS" 72 ac_save_CPPFLAGS="$CPPFLAGS"
73 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 73 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
74 74
@@ -85,7 +85,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
85 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; 85 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
86 *) LIBS="$LIB[]NAME $LIBS" ;; 86 *) LIBS="$LIB[]NAME $LIBS" ;;
87 esac 87 esac
88 AC_TRY_LINK([$3], [$4], 88 AC_LINK_IFELSE(
89 [AC_LANG_PROGRAM([[$3]], [[$4]])],
89 [ac_cv_lib[]Name=yes], 90 [ac_cv_lib[]Name=yes],
90 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) 91 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
91 LIBS="$ac_save_LIBS" 92 LIBS="$ac_save_LIBS"
@@ -115,6 +116,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
115dnl Determine the platform dependent parameters needed to use rpath: 116dnl Determine the platform dependent parameters needed to use rpath:
116dnl acl_libext, 117dnl acl_libext,
117dnl acl_shlibext, 118dnl acl_shlibext,
119dnl acl_libname_spec,
120dnl acl_library_names_spec,
118dnl acl_hardcode_libdir_flag_spec, 121dnl acl_hardcode_libdir_flag_spec,
119dnl acl_hardcode_libdir_separator, 122dnl acl_hardcode_libdir_separator,
120dnl acl_hardcode_direct, 123dnl acl_hardcode_direct,
@@ -157,15 +160,15 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
157dnl macro call that searches for libname. 160dnl macro call that searches for libname.
158AC_DEFUN([AC_LIB_FROMPACKAGE], 161AC_DEFUN([AC_LIB_FROMPACKAGE],
159[ 162[
160 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 163 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
161 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 164 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
162 define([acl_frompackage_]NAME, [$2]) 165 define([acl_frompackage_]NAME, [$2])
163 popdef([NAME]) 166 popdef([NAME])
164 pushdef([PACK],[$2]) 167 pushdef([PACK],[$2])
165 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], 168 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
166 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 169 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
167 define([acl_libsinpackage_]PACKUP, 170 define([acl_libsinpackage_]PACKUP,
168 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) 171 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
169 popdef([PACKUP]) 172 popdef([PACKUP])
170 popdef([PACK]) 173 popdef([PACK])
171]) 174])
@@ -178,14 +181,14 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
178AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 181AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
179[ 182[
180 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 183 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
181 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 184 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
182 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 185 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
183 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) 186 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
184 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], 187 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
185 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 188 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
186 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) 189 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
187 dnl Autoconf >= 2.61 supports dots in --with options. 190 dnl Autoconf >= 2.61 supports dots in --with options.
188 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) 191 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
189 dnl By default, look in $includedir and $libdir. 192 dnl By default, look in $includedir and $libdir.
190 use_additional=yes 193 use_additional=yes
191 AC_LIB_WITH_FINAL_PREFIX([ 194 AC_LIB_WITH_FINAL_PREFIX([
@@ -242,7 +245,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
242 names_already_handled="$names_already_handled $name" 245 names_already_handled="$names_already_handled $name"
243 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 246 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
244 dnl or AC_LIB_HAVE_LINKFLAGS call. 247 dnl or AC_LIB_HAVE_LINKFLAGS call.
245 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 248 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
246 eval value=\"\$HAVE_LIB$uppername\" 249 eval value=\"\$HAVE_LIB$uppername\"
247 if test -n "$value"; then 250 if test -n "$value"; then
248 if test "$value" = yes; then 251 if test "$value" = yes; then