blob: f08e01344f3f37d6c9c6a6e0996cc862ddda8a5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
dnl check if ld supports --version-script
dnl
AC_DEFUN([rk_VERSIONSCRIPT],[
AC_CACHE_CHECK(for ld --version-script, rk_cv_version_script,[
rk_cv_version_script=no
cat > conftest.map <<EOF
HEIM_GSS_V1 {
global: gss*;
};
HEIM_GSS_V1_1 {
global: gss_init_creds;
} HEIM_GSS_V1;
EOF
cat > conftest.c <<EOF
int gss_init_creds(int foo) { return 0; }
EOF
if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -fPIC conftest.c]) &&
AC_TRY_COMMAND([${CC-cc} -shared -Wl,--version-script,conftest.map $CFLAGS $LDFLAGS -o libconftestlib.so conftest.o]);
then
rk_cv_version_script=yes
fi
rm -rf conftest* libconftest* .libs
])
if test $rk_cv_version_script = yes ; then
doversioning=yes
LDFLAGS_VERSION_SCRIPT="-Wl,--version-script,"
else
doversioning=no
LDFLAGS_VERSION_SCRIPT=
fi
AC_SUBST(VERSIONING)
AM_CONDITIONAL(versionscript,test $doversioning = yes)
AC_SUBST(LDFLAGS_VERSION_SCRIPT)
])
|