diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-09-29 17:54:09 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-09-29 17:54:09 +0000 |
commit | 558ff16e56d4ef6adc714ed81c5b70690dee1eff (patch) | |
tree | 7e8b1feef1f66d5e9914662de500e3c26de78a51 | |
parent | 0529b414696b73b0b922da59c03b267d676e35b9 (diff) |
Workaround for Mac OSX where readline.h doesn't compile if stdio.h is
not included first.
-rw-r--r-- | infrastructure/m4/vl_lib_readline.m4 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/infrastructure/m4/vl_lib_readline.m4 b/infrastructure/m4/vl_lib_readline.m4 index 21440111..bafccef9 100644 --- a/infrastructure/m4/vl_lib_readline.m4 +++ b/infrastructure/m4/vl_lib_readline.m4 @@ -128,6 +128,18 @@ AC_DEFUN([VL_LIB_READLINE_CHECK], [ ]) fi + AC_TRY_LINK([$vl_cv_lib_includes], [(void) readline;], + [vl_compiles=yes], [vl_compiles=no]) + if test "x$vl_compiles" = "xno"; then + AC_TRY_LINK([#include <stdio.h> + $vl_cv_lib_includes], [(void) readline;], + [vl_compiles_with_stdio=yes], [vl_compiles_with_stdio=no]) + if test "x$vl_compiles_with_stdio" = "xyes"; then + vl_cv_lib_includes="#include <stdio.h> +$vl_cv_lib_includes" + fi + fi + if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then BOX_CHECK_VAR([rl_completion_matches], [in readline headers], [$vl_cv_lib_includes]) |