Debian Codegraph @

debian/patches/include_ltdlm4

raw
1 From: Marco d'Itri <[email protected]>
2 Subject: vendorize the LT_SYS_SYMBOL_USCORE macro
3 Forwarded: not-needed
4 Bug-Debian: https://bugs.debian.org/985311
5
6 Include LT_SYS_SYMBOL_USCORE from ltdl.m4.
7
8 This way the package does not need to depend on libltdl-dev.
9
10 --- /dev/null
11 +++ b/build-aux/m4/symbol_uscore.m4
12 @@ -0,0 +1,50 @@
13 +# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
14 +#
15 +# Copyright (C) 1999-2008, 2011-2015 Free Software Foundation, Inc.
16 +# Written by Thomas Tanner, 1999
17 +#
18 +# This file is free software; the Free Software Foundation gives
19 +# unlimited permission to copy and/or distribute it, with or without
20 +# modifications, as long as this notice is preserved.
21 +
22 +# This macro has been copied from /usr/share/aclocal/ltdl.m4,
23 +# part of libltdl-dev 2.4.6-15.
24 +
25 +# LT_SYS_SYMBOL_USCORE
26 +# --------------------
27 +# does the compiler prefix global symbols with an underscore?
28 +AC_DEFUN([LT_SYS_SYMBOL_USCORE],
29 +[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
30 +AC_CACHE_CHECK([for _ prefix in compiled symbols],
31 + [lt_cv_sys_symbol_underscore],
32 + [lt_cv_sys_symbol_underscore=no
33 + cat > conftest.$ac_ext <<_LT_EOF
34 +void nm_test_func(){}
35 +int main(){nm_test_func;return 0;}
36 +_LT_EOF
37 + if AC_TRY_EVAL(ac_compile); then
38 + # Now try to grab the symbols.
39 + ac_nlist=conftest.nm
40 + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
41 + # See whether the symbols have a leading underscore.
42 + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
43 + lt_cv_sys_symbol_underscore=yes
44 + else
45 + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
46 + :
47 + else
48 + echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
49 + fi
50 + fi
51 + else
52 + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
53 + fi
54 + else
55 + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
56 + cat conftest.c >&AS_MESSAGE_LOG_FD
57 + fi
58 + rm -rf conftest*
59 + ])
60 + sys_symbol_underscore=$lt_cv_sys_symbol_underscore
61 + AC_SUBST([sys_symbol_underscore])
62 +])# LT_SYS_SYMBOL_USCORE