dnl Copyright (C) 2004, 2005, 2009
dnl Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-dnl
+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 and/or 3 of the License.
-dnl
+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
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.
[do not use the alternative _syscallX macros
provided by Herbert Poetzl (default: use them)])],
[case $enableval in
- (yes|no) ensc_use_alternative_syscall_macros=$enableval;;
+ (yes|no) ensc_use_alternative_syscall_macros=$enableval;;
(*) AC_MSG_ERROR(['$enableval' is not a valid value for '--disable-alternative-syscalls']);;
esac],
- [ensc_use_alternative_syscall_macros=yes])
+ [ensc_use_alternative_syscall_macros=yes])
case $ensc_use_alternative_syscall_macros in
(yes) AC_DEFINE(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS, 1, [Use alternative _syscallX macros]);;
[
AC_REQUIRE([ENSC_SYSCALL_ALTERNATIVE])
- AC_MSG_CHECKING([for syscall(2) invocation method])
- AC_ARG_WITH([syscall],
- [AC_HELP_STRING([--with-syscall=METHOD],
- [call syscall(2) with the specified METHOD; valid values are 'fast', 'traditional' and 'auto' (default: auto)])],
- [],
- [with_syscall=auto])
- AC_MSG_RESULT([$with_syscall])
-
- case x"$with_syscall" in
- (xauto)
+ AC_MSG_CHECKING([for syscall(2) invocation method])
+ AC_ARG_WITH([syscall],
+ [AC_HELP_STRING([--with-syscall=METHOD],
+ [call syscall(2) with the specified METHOD; valid values are 'fast', 'traditional' and 'auto' (default: auto)])],
+ [],
+ [with_syscall=auto])
+ AC_MSG_RESULT([$with_syscall])
+
+ case x"$with_syscall" in
+ (xauto)
AC_CACHE_CHECK([which syscall(2) invocation works], [ensc_cv_test_syscall],
[
AC_LANG_PUSH(C)
return foo0() || \
foo1(1) || \
foo2(1,2) || \
- foo3(1,2,3) || \
- foo4(1,2,3,4) || \
+ foo3(1,2,3) || \
+ foo4(1,2,3,4) || \
foo5(1,2,3,4,5);
}
]),
AC_LANG_POP
])
with_syscall=$ensc_cv_test_syscall
- ;;
- (xfast|xtraditional)
- ;;
- *)
- AC_MSG_ERROR(['$with_syscall' is not a valid value for '--with-syscall'])
- ;;
- esac
+ ;;
+ (xfast|xtraditional)
+ ;;
+ *)
+ AC_MSG_ERROR(['$with_syscall' is not a valid value for '--with-syscall'])
+ ;;
+ esac
if test x"$with_syscall $ensc_use_alternative_syscall_macros" = 'xfast yes'; then
with_syscall='alternative'
- fi
+ fi
+
+ if test x"$with_syscall" = xtraditional; then
+ AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work])
+ fi
- if test x"$with_syscall" = xtraditional; then
- AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work])
- fi
-
- AH_BOTTOM([
+ AH_BOTTOM([
#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS)
# define ENSC_SYSCALL_TRADITIONAL 1
#endif])