diff options
| -rw-r--r-- | core/detect/readline.c | 3 | ||||
| -rw-r--r-- | core/makefile | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/core/detect/readline.c b/core/detect/readline.c new file mode 100644 index 000000000..13452bd84 --- /dev/null +++ b/core/detect/readline.c @@ -0,0 +1,3 @@ +#include<stdio.h> +#include<readline/readline.h> +int main(){readline(0);return 0;} diff --git a/core/makefile b/core/makefile index 10911402f..fcee1b008 100644 --- a/core/makefile +++ b/core/makefile @@ -269,8 +269,8 @@ base_LIBNAMES := ws2_32 endif ifeq ($(PLAT),linux) -base_LIBPATH := $(shell find "/usr" -name libreadline.so | grep ".*/" -o) -base_LIBNAMES := $(shell find "/usr" -name libreadline.so | grep readline -o) m dl pthread +base_LIBPATH := +base_LIBNAMES := $(shell if { cat detect/readline.c | $(CC) -xc - -lreadline -o /dev/null 2>/dev/null; }; then echo readline; fi ) m dl pthread endif # check jit compiler |
