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