PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/crypto/heimdal/cf/version-script.m4

https://bitbucket.org/freebsd/freebsd-head/
m4 | 40 lines | 35 code | 5 blank | 0 comment | 0 complexity | df6fa6261babdc7999b3176c1f0d24f1 MD5 | raw file
 1dnl check if ld supports --version-script
 2dnl
 3AC_DEFUN([rk_VERSIONSCRIPT],[
 4AC_CACHE_CHECK(for ld --version-script, rk_cv_version_script,[
 5  rk_cv_version_script=no
 6
 7  cat > conftest.map <<EOF
 8HEIM_GSS_V1 {
 9        global: gss*;
10};
11HEIM_GSS_V1_1 {
12        global: gss_init_creds;
13} HEIM_GSS_V1;
14EOF
15cat > conftest.c <<EOF
16int gss_init_creds(int foo) { return 0; }
17EOF
18
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
25rm -f conftest*
26])
27
28if test $rk_cv_version_script = yes ; then
29  doversioning=yes
30  LDFLAGS_VERSION_SCRIPT="-Wl,--version-script,"
31else
32  doversioning=no
33  LDFLAGS_VERSION_SCRIPT=
34fi
35AC_SUBST(VERSIONING)
36
37AM_CONDITIONAL(versionscript,test $doversioning = yes)
38AC_SUBST(LDFLAGS_VERSION_SCRIPT)
39
40])