aboutsummaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m415
1 files changed, 11 insertions, 4 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index ac6b6684a51b..25ecc49a2203 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
}
]])],
[
-if `grep -i "unrecognized option" conftest.err >/dev/null`
+if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
then
AC_MSG_RESULT([no])
CFLAGS="$saved_CFLAGS"
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
}
]])],
[
-if `grep -i "unrecognized option" conftest.err >/dev/null`
+if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
then
AC_MSG_RESULT([no])
CFLAGS="$saved_CFLAGS"
@@ -100,8 +100,15 @@ int main(int argc, char **argv) {
exit(0);
}
]])],
- [ AC_MSG_RESULT([yes])
- LDFLAGS="$saved_LDFLAGS $_define_flag"],
+ [
+if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
+then
+ AC_MSG_RESULT([no])
+ LDFLAGS="$saved_LDFLAGS"
+else
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$saved_LDFLAGS $_define_flag"
+fi ],
[ AC_MSG_RESULT([no])
LDFLAGS="$saved_LDFLAGS" ]
)