summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2018-10-01 19:02:39 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-10-02 10:26:25 +0200
commit42efb0d43b63f206c4dfb0c5e8c8a772a768b9d1 (patch)
tree92ea37563e19d001ddaa95e5d75df71c9aeab7a6 /configure.ac
parentMerge pull request #3111 from pacovn/Coverity_1302499_Logically_dead_code (diff)
downloadfrr-42efb0d43b63f206c4dfb0c5e8c8a772a768b9d1.tar.xz
frr-42efb0d43b63f206c4dfb0c5e8c8a772a768b9d1.zip
lib: print version information in libfrr.so
This makes libfrr.so executable to print its version info. This is useful if you need to check your libfrr.so matches your daemons. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4d18c7997..93b7f7a5f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -741,6 +741,20 @@ if test "x$with_pkg_git_version" = "xyes"; then
fi
AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"])
+AC_CHECK_TOOL([OBJCOPY], [objcopy], [:])
+AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [
+ frr_cv_interp=""
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], [
+ if $OBJCOPY -j.interp -Obinary conftest conftest.interp; then
+ frr_cv_interp="`xargs -0 echo < conftest.interp`"
+ fi
+ test -f conftest.interp && rm conftest.interp
+ ])
+])
+if test -n "$frr_cv_interp"; then
+ AC_DEFINE_UNQUOTED(INTERP, ["$frr_cv_interp"], [.interp value])
+fi
+
dnl ------------------------------------
dnl Check C keywords and standard types
dnl ------------------------------------