3 dnl Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; version 2 of the License.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 AC_DEFUN([ENSC_DIETLIBC_NEED_COMPAT],
20 AC_REQUIRE([ENSC_ENABLE_DIETLIBC])
21 AC_CACHE_CHECK([whether dietlibc needs '-lcompat'], [ensc_cv_c_dietlibc_compat],
25 CC="${DIET:-diet} $CC"
28 #include <sys/syscall.h>
33 inline static _syscall0(int, foo)
36 [ensc_cv_c_dietlibc_compat=no],
37 [ensc_cv_c_dietlibc_compat=yes])
42 if test x"$1" != x; then
43 AM_CONDITIONAL($1, test x"$ensc_cv_c_dietlibc_compat" = xyes)