1 dnl check if ld supports --version-script
3 AC_DEFUN([rk_VERSIONSCRIPT],[
4 AC_CACHE_CHECK(for ld --version-script, rk_cv_version_script,[
5 rk_cv_version_script=no
7 cat > conftest.map <<EOF
12 global: gss_init_creds;
15 cat > conftest.c <<EOF
16 int gss_init_creds(int foo) { return 0; }
19 if AC_TRY_COMMAND([$SHELL libtool --tag=CC --mode=compile ${CC-cc} -c $CFLAGS conftest.c]) &&
20 AC_TRY_COMMAND([$SHELL libtool --tag=CC --mode=link ${CC-cc} -version-info 1:0:0 -Wl,--version-script,conftest.map -rpath `pwd` $CFLAGS $LDFLAGS -o libconftestlib.la conftest.lo]);
22 rk_cv_version_script=yes
24 rm -rf conftest* libconftest* .libs
27 if test $rk_cv_version_script = yes ; then
29 LDFLAGS_VERSION_SCRIPT="-Wl,--version-script,"
32 LDFLAGS_VERSION_SCRIPT=
36 AM_CONDITIONAL(versionscript,test $doversioning = yes)
37 AC_SUBST(LDFLAGS_VERSION_SCRIPT)