isl_pw_qpolynomial_upper_bound: set up variable vector after lifting
[barvinok.git] / m4 / strerror.m4
blob52f3e3fdc3a32cf4e37cc815206f0de4f1a23bda
1 # strerror.m4 serial 4
2 dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_STRERROR],
9   AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
10   if test $gl_cv_func_working_strerror = no; then
11     AC_LIBOBJ([strerror])
12     AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
13       [Define this to 1 if strerror is broken.])
14   fi
17 # Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
18 AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
20   AC_CHECK_FUNCS_ONCE([strerror])
21   gl_PREREQ_STRERROR
22   if test $ac_cv_func_strerror = no; then
23     HAVE_DECL_STRERROR=0
24     gl_cv_func_working_strerror=no
25   else
26     AC_CACHE_CHECK([for working strerror function],
27      [gl_cv_func_working_strerror],
28      [AC_RUN_IFELSE(
29        [AC_LANG_PROGRAM([
30 #include <string.h>
31          ], [return !*strerror (-2);])],
32        [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no],
33        [dnl assume success except on Interix
34         AC_EGREP_CPP([assuming success], [
35 #ifndef __INTERIX
36   assuming success
37 #endif
38         ], [gl_cv_func_working_strerror=yes],
39         [gl_cv_func_working_strerror=no])])])
40     if test $gl_cv_func_working_strerror = no ; then
41       REPLACE_STRERROR=1
42     fi
43   fi
46 # Prerequisites of lib/strerror.c.
47 AC_DEFUN([gl_PREREQ_STRERROR], [
48   :