From 91371fc62de37f5f6ae8ea6ef06db7b38d2b0112 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 17 Feb 2004 19:52:00 +0000 Subject: [PATCH] initial checkin git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@921 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/m4/ensc_dietlibc_compat.m4 | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 util-vserver/m4/ensc_dietlibc_compat.m4 diff --git a/util-vserver/m4/ensc_dietlibc_compat.m4 b/util-vserver/m4/ensc_dietlibc_compat.m4 new file mode 100644 index 0000000..d65066f --- /dev/null +++ b/util-vserver/m4/ensc_dietlibc_compat.m4 @@ -0,0 +1,45 @@ +dnl $Id$ + +dnl Copyright (C) 2004 Enrico Scholz +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; version 2 of the License. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +AC_DEFUN([ENSC_DIETLIBC_NEED_COMPAT], +[ + AC_REQUIRE([ENSC_ENABLE_DIETLIBC]) + AC_CACHE_CHECK([whether dietlibc needs '-lcompat'], [ensc_cv_c_dietlibc_compat], + [ + AC_LANG_PUSH(C) + old_CC=$CC + CC="${DIET:-diet} $CC" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ +#include +#include +#include + +#define __NR_foo 0 +inline static _syscall0(int, foo) +], + [foo()])], + [ensc_cv_c_dietlibc_compat=no], + [ensc_cv_c_dietlibc_compat=yes]) + CC=$old_CC + AC_LANG_POP + ]) + + if test x"$1" != x; then + AM_CONDITIONAL($1, test x"$ensc_cv_c_dietlibc_compat" = xyes) + fi +]) -- 1.8.1.5