aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-08 08:43:38 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-21 23:38:09 +0800
commit147078f43db61e75301a80a0d2eb182c945e9e74 (patch)
tree8db90f2a61d9314a0623201d7e26e1b2e9b96fe2 /configure.ac
parent90629caa61b605c403aa33c1e3d7bdd2d7b6cb6b (diff)
Solaris build fixes: use _sys_errs if available
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac50
1 files changed, 50 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 99a12cd4..cba17847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -694,6 +694,56 @@ else
AC_MSG_RESULT(no)
fi
+# Check for sys_errlist
+AC_MSG_CHECKING([for sys_errlist array])
+AC_TRY_LINK(
+ [
+ #include <stdio.h>
+ ],
+ [
+ const char *p;
+ p = sys_errlist[sys_nerr];
+ ],
+ have_sys_errlist=yes,
+ have_sys_errlist=no
+)
+if test "$have_sys_errlist" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(
+ [HAVE_SYS_ERRLIST],
+ [1],
+ [Define to 1 if the sys_errlist array is available.]
+ )
+else
+ AC_MSG_RESULT(no)
+fi
+
+# Check for _sys_errs
+AC_MSG_CHECKING([for _sys_errs array])
+AC_TRY_LINK(
+ [
+ #include <string>
+ ],
+ [
+ std::string p;
+ extern const char _sys_errs[];
+ extern const int _sys_index[];
+ p = _sys_errs[_sys_index[0]];
+ ],
+ have__sys__errs=yes,
+ have__sys__errs=no
+)
+if test "$have__sys__errs" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(
+ [HAVE__SYS__ERRS],
+ [1],
+ [Define to 1 if the _sys_errs array is available.]
+ )
+else
+ AC_MSG_RESULT(no)
+fi
+
# Check if getopt_long exists and works
AC_MSG_CHECKING([if getopt_long exists and works])
AC_TRY_LINK(