diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2005-03-09 20:59:05 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2005-03-09 20:59:05 +0000 |
commit | a1d345e700c0fdd339c516163484cd00efc06425 (patch) | |
tree | ae825866e37ce3188e63ef3e0bf954c0635a5180 /dev-libs/klibc/files | |
parent | add gnome-backgrounds (diff) | |
download | historical-a1d345e700c0fdd339c516163484cd00efc06425.tar.gz historical-a1d345e700c0fdd339c516163484cd00efc06425.tar.bz2 historical-a1d345e700c0fdd339c516163484cd00efc06425.zip |
Initial version
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'dev-libs/klibc/files')
-rw-r--r-- | dev-libs/klibc/files/digest-klibc-1.0 | 1 | ||||
-rw-r--r-- | dev-libs/klibc/files/klibc.m4 | 75 |
2 files changed, 76 insertions, 0 deletions
diff --git a/dev-libs/klibc/files/digest-klibc-1.0 b/dev-libs/klibc/files/digest-klibc-1.0 new file mode 100644 index 000000000000..770a4cc89e7d --- /dev/null +++ b/dev-libs/klibc/files/digest-klibc-1.0 @@ -0,0 +1 @@ +MD5 daaa233fb7905cbe110896fcad9bec7f klibc-1.0.tar.bz2 435794 diff --git a/dev-libs/klibc/files/klibc.m4 b/dev-libs/klibc/files/klibc.m4 new file mode 100644 index 000000000000..33a659ad8752 --- /dev/null +++ b/dev-libs/klibc/files/klibc.m4 @@ -0,0 +1,75 @@ +# klibc.m4 serial 99 +## Copyright (C) 1995-2003 Free Software Foundation, Inc. +## This file is free software, distributed under the terms of the GNU +## General Public License. As a special exception to the GNU General +## Public License, this file may be distributed as part of a program +## that contains a configuration script generated by Autoconf, under +## the same distribution terms as the rest of that program. +## +## This file can can be used in projects which are not available under +## the GNU General Public License or the GNU Library General Public +## License but which still want to provide support for the GNU gettext +## functionality. +## Please note that the actual code of the GNU gettext library is covered +## by the GNU Library General Public License, and the rest of the GNU +## gettext package package is covered by the GNU General Public License. +## They are *not* in the public domain. + +# Authors: +# Martin Schlemmer <azarah@nosferatu.za.org>, 2005. + + +# AC_CHECK_KLIBC +# -------------- +# Check if the user wants KLIBC support enabled. If so, set KLIBC=yes and +# fill in KLIBC_PREFIX, KLIBC_BINDIR, KLIBC_SBINDIR, KLIBC_LIBDIR and +# KLIBC_INCLUDEDIR. CC is also set to the proper klcc executable. +# NOTE: This should be called before AC_PROG_CC, and before header, function +# or type checks. +AC_DEFUN([AC_CHECK_KLIBC], +[AC_BEFORE([$0], [AC_PROG_CC]) +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_ENABLE([klibc], + [AS_HELP_STRING([--enable-klibc], + [Use this to link the tools to klibc. Set KLCC + to the absolute file name of klcc if not in + the PATH.])], + [KLIBC=yes], [KLIBC=no]) + +if test "X$KLIBC" = Xyes; then + # Basic cross compiling support. I do not think it is wise to use + # AC_CHECK_TOOL, because if we are cross compiling, we do not want + # just 'klcc' to be returned ... + if test "${host_alias}" != "${build_alias}"; then + AC_CHECK_PROGS([KLCC], [${host_alias}-klcc], [no]) + else + AC_CHECK_PROGS([KLCC], [klcc], [no]) + fi + if test "X$KLCC" = Xno; then + AC_MSG_ERROR([cannot find klibc frontend 'klcc'!]) + fi + + CC="$KLCC" + CFLAGS="-Os" + KLIBC_KCROSS="$($KLCC -print-klibc-kcross 2>/dev/null)" + KLIBC_PREFIX="$($KLCC -print-klibc-prefix 2>/dev/null)" + KLIBC_BIN_DIR="$($KLCC -print-klibc-bindir 2>/dev/null)" + KLIBC_SBIN_DIR="${KLIBC_PREFIX}/${KLIBC_KCROSS}sbin" + KLIBC_LIB_DIR="$($KLCC -print-klibc-libdir 2>/dev/null)" + KLIBC_INCLUDE_DIR="$($KLCC -print-klibc-includedir 2>/dev/null)" + + # At least KLIBC_LIB_DIR should be valid, else klibc is too old or + # something went wrong + if test ! -d "$KLIBC_LIB_DIR"; then + AC_MSG_ERROR([your klibc installation is too old or not functional!]) + fi +fi + +AC_SUBST(KLIBC) +AC_SUBST(KLIBC_PREFIX) +AC_SUBST(KLIBC_BIN_DIR) +AC_SUBST(KLIBC_SBIN_DIR) +AC_SUBST(KLIBC_LIB_DIR) +AC_SUBST(KLIBC_INCLUDE_DIR) +])# AC_CHECK_KLIBC + |