Diff

Differences From Artifact [d6fff4a63c]:

To Artifact [9a1977c3cc]:


   229    229   	else
   230    230   		LDFLAGS="${SAVELDFLAGS}"
   231    231   		AC_MSG_RESULT([not needed])
   232    232   	fi
   233    233   
   234    234   	AC_SUBST(LDFLAGS)
   235    235   ])
          236  +
          237  +AC_DEFUN(DC_CHECK_FOR_ACCEPTABLE_DLADDR, [
          238  +	AC_CHECK_HEADERS(dlfcn.h)
          239  +	AC_CHECK_FUNCS(dladdr)
          240  +
          241  +	AC_MSG_CHECKING([for acceptable dladdr])
          242  +
          243  +	AC_LINK_IFELSE(
          244  +		AC_LANG_PROGRAM([[
          245  +#ifdef HAVE_DLFCN_H
          246  +#include <dlfcn.h>
          247  +#endif
          248  +			]], [[
          249  +char *x;
          250  +Dl_info syminfo;
          251  +dladdr((void *) 0, &syminfo);
          252  +x = syminfo.dli_fname;
          253  +			]]
          254  +		),
          255  +		[
          256  +			AC_MSG_RESULT([found])
          257  +			AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname])
          258  +		], [
          259  +			AC_MSG_RESULT([not found])
          260  +		]
          261  +	)
          262  +])