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} -c $CFLAGS -fPIC conftest.c]) &&
20 AC_TRY_COMMAND([${CC-cc} -shared -Wl,--version-script,conftest.map $CFLAGS $LDFLAGS -o libconftestlib.so conftest.o]);
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)