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([${CC-cc} $CFLAGS $LDFLAGS -shared
20 -o conftest.so conftest.c
21 -Wl,--version-script,conftest.map]);
23 rk_cv_version_script=yes
28 if test $rk_cv_version_script = yes ; then
30 LDFLAGS_VERSION_SCRIPT="-Wl,--version-script,"
33 LDFLAGS_VERSION_SCRIPT=
37 AM_CONDITIONAL(versionscript,test $doversioning = yes)
38 AC_SUBST(LDFLAGS_VERSION_SCRIPT)