No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / cf / version-script.m4
blob342e5ac9cb1479a9e3f19e9d1ab5598a7be4dccb
1 dnl check if ld supports --version-script
2 dnl
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
8 HEIM_GSS_V1 {
9         global: gss*;
11 HEIM_GSS_V1_1 {
12         global: gss_init_creds;
13 } HEIM_GSS_V1;
14 EOF
15 cat > conftest.c <<EOF
16 int gss_init_creds(int foo) { return 0; }
17 EOF
19   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
20                                -o conftest.so conftest.c
21                                -Wl,--version-script,conftest.map]);
22   then
23     rk_cv_version_script=yes
24   fi
25 rm -f conftest*
28 if test $rk_cv_version_script = yes ; then
29   doversioning=yes
30   LDFLAGS_VERSION_SCRIPT="-Wl,--version-script,"
31 else
32   doversioning=no
33   LDFLAGS_VERSION_SCRIPT=
35 AC_SUBST(VERSIONING)
37 AM_CONDITIONAL(versionscript,test $doversioning = yes)
38 AC_SUBST(LDFLAGS_VERSION_SCRIPT)