aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2005-06-30 04:53:05 +0000
committerDan Fandrich <dan@coneharvesters.com>2005-06-30 04:53:05 +0000
commitb37a0b05123b0a390e06acdb3272ca67fcb5993a (patch)
treeb4f13507fd142d31f600ba02c48a97fbfb4293a2
parent5c5d5270d2d1ecf4615887d45cf1c892fb227e52 (diff)
Detect (or at least infer) glibc-style strerror_r even when cross-compiling.
-rw-r--r--acinclude.m416
1 files changed, 14 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e95dd0002..9c801ab6e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -457,8 +457,20 @@ main () {
AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]),
- dnl cross-compiling!
- AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
+
+ dnl Use an inferior method of strerror_r detection while cross-compiling
+ AC_EGREP_CPP(yes, [
+#include <features.h>
+#ifdef __GLIBC__
+yes
+#endif
+],
+ dnl looks like glibc, so assume a glibc-style strerror_r()
+ GLIBC_STRERROR_R="1"
+ AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
+ AC_MSG_RESULT([yes]),
+ AC_MSG_NOTICE([cannot determine strerror_r() style: edit lib/config.h manually!])
+ ) dnl while cross-compiling
)
if test -z "$GLIBC_STRERROR_R"; then