1 dnl Copyright (C) 2007 Free Software Foundation, Inc. 2 dnl This file is free software, distributed under the terms of the GNU 3 dnl General Public License. As a special exception to the GNU General 4 dnl Public License, this file may be distributed as part of a program 5 dnl that contains a configuration script generated by Autoconf, under 6 dnl the same distribution terms as the rest of that program. 7 8 dnl Set SYMBOLIC_LDFLAGS to -Bsymbolic-functions for GNU linker if it 9 dnl is supported. 10 AC_DEFUN([ACX_PROG_LD_GNU_SYMBOLIC], 11 [AC_CACHE_CHECK([if the GNU linker ($LD) supports -Bsymbolic-functions], 12 acl_cv_prog_gnu_ld_symbolic, [ 13 acl_cv_prog_gnu_ld_symbolic=no 14 AC_REQUIRE([AC_LIB_PROG_LD_GNU]) 15 if test x"$with_gnu_ld" = x"yes"; then 16 if $LD --help 2>&1 </dev/null | grep Bsymbolic-functions 1>&5; then 17 acl_cv_prog_gnu_ld_symbolic=yes 18 fi 19 fi]) 20 if test x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then 21 SYMBOLIC_LDFLAGS="-Wl,-Bsymbolic-functions" 22 else 23 SYMBOLIC_LDFLAGS='' 24 fi 25 ]) 26 27 dnl Set DYNAMIC_LIST_CPP_NEW_LDFLAGS to --dynamic-list-cpp-new for GNU 28 dnl linker if it is supported. 29 AC_DEFUN([ACX_PROG_LD_GNU_DYNAMIC_LIST_CPP_NEW], 30 [AC_CACHE_CHECK([if the GNU linker ($LD) supports --dynamic-list-cpp-new], 31 acl_cv_prog_gnu_ld_dynamic_list_cpp_new, [ 32 acl_cv_prog_gnu_ld_dynamic_list_cpp_new=no 33 AC_REQUIRE([ACX_PROG_LD_GNU_SYMBOLIC]) 34 if test x"$with_gnu_ld" = x"yes" -a \ 35 x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then 36 if $LD --help 2>&1 </dev/null | grep dynamic-list-cpp-new 1>&5; then 37 acl_cv_prog_gnu_ld_dynamic_list_cpp_new=yes 38 fi 39 fi]) 40 if test x"$acl_cv_prog_gnu_ld_dynamic_list_cpp_new" = x"yes"; then 41 DYNAMIC_LIST_CPP_NEW_LDFLAGS="$SYMBOLIC_LDFLAGS -Wl,--dynamic-list-cpp-new" 42 else 43 DYNAMIC_LIST_CPP_NEW_LDFLAGS='' 44 fi 45 ]) 46