diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:50 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:50 +0000 |
commit | a5b7cd8279132bc1ced7cc0845619aef8a831971 (patch) | |
tree | 86dd91027b1d30623b24a9fff93d1df1ab74a8bc /buildlib/tools.m4 | |
parent | 773b28f3a5b213994e449abb8862f11e7a5e9e04 (diff) |
glibc/libstdc++ dependency patches
Author: tausq
Date: 2001-02-27 04:16:05 GMT
glibc/libstdc++ dependency patches
Diffstat (limited to 'buildlib/tools.m4')
-rw-r--r-- | buildlib/tools.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/buildlib/tools.m4 b/buildlib/tools.m4 index d47d79e7e..281a4ec1d 100644 --- a/buildlib/tools.m4 +++ b/buildlib/tools.m4 @@ -88,3 +88,48 @@ AC_DEFUN(ah_NUM_PROCS, AC_MSG_RESULT([$NUM_PROCS]) AC_SUBST(NUM_PROCS) ]) + +AC_DEFUN(ah_GLIBC_VER, + [AC_MSG_CHECKING([glibc version]) + dummy=if$$ + cat <<_GLIBC_>$dummy.c +#include <features.h> +#include <stdio.h> +int main(int argc, char **argv) { printf("libc6.%d",__GLIBC_MINOR__); exit(0); } +_GLIBC_ + ${CC-cc} $dummy.c -o $dummy + if test "$?" = 0; then + GLIBC_VER=`./$dummy` + AC_MSG_RESULT([$GLIBC_VER]) + GLIBC_VER="-$GLIBC_VER" + else + AC_MSG_WARN([cannot determine GNU C library minor version number]) + fi + rm -f $dummy $dummy.c + AC_SUBST(GLIBC_VER) +]) + +AC_DEFUN(ah_LIBSTDCPP_VER, + [AC_MSG_CHECKING([libstdc++ version]) + dummy=if$$ + cat <<_LIBSTDCPP_>$dummy.cc +#include <features.h> +#include <stdio.h> +int main(int argc, char **argv) { exit(0); } +_LIBSTDCPP_ + ${CXX-c++} $dummy.cc -o $dummy + + if test "$?" = 0; then + soname=`objdump -p ./$dummy |grep NEEDED|grep libstd` + LIBSTDCPP_VER=`echo $soname | sed -e 's/.*NEEDED.*libstdc++-libc.*-\(.*\).so.\(.*\)/\2-\1/'` + fi + rm -f $dummy $dummy.cc + + if test -z "$LIBSTDCPP_VER"; then + AC_MSG_WARN([cannot determine standard C++ library version number]) + else + AC_MSG_RESULT([$LIBSTDCPP_VER]) + LIBSTDCPP_VER="-$LIBSTDCPP_VER" + fi + AC_SUBST(LIBSTDCPP_VER) +]) |