Add readline test.
Showing
2 changed files
with
18 additions
and
0 deletions
... | @@ -26,6 +26,14 @@ AC_ARG_ENABLE(pthread, | ... | @@ -26,6 +26,14 @@ AC_ARG_ENABLE(pthread, |
26 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-pthread) ;; | 26 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-pthread) ;; |
27 | esac],[usepthread=yes]) | 27 | esac],[usepthread=yes]) |
28 | 28 | ||
29 | AC_ARG_WITH(readline, | ||
30 | [ --without-readline do not use readline], | ||
31 | [case "${withval}" in | ||
32 | yes) usereadline=yes ;; | ||
33 | no) usereadline=no ;; | ||
34 | *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; | ||
35 | esac],[usereadline=yes]) | ||
36 | |||
29 | dnl Check for headers | 37 | dnl Check for headers |
30 | AC_HEADER_STDC | 38 | AC_HEADER_STDC |
31 | AC_HEADER_DIRENT | 39 | AC_HEADER_DIRENT |
... | @@ -85,6 +93,12 @@ AC_CHECK_FUNC(gethostbyname, [true], | ... | @@ -85,6 +93,12 @@ AC_CHECK_FUNC(gethostbyname, [true], |
85 | AC_CHECK_FUNC(socket, [true], | 93 | AC_CHECK_FUNC(socket, [true], |
86 | AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS")) | 94 | AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS")) |
87 | 95 | ||
96 | dnl Check for readline | ||
97 | if test x"$usereadline" = x"yes"; then | ||
98 | AC_CHECK_LIB(readline, readline, | ||
99 | AC_CHECK_HEADERS(readline/readline.h, AC_DEFINE(WITH_READLINE))) | ||
100 | fi | ||
101 | |||
88 | dnl Output Makefiles | 102 | dnl Output Makefiles |
89 | AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile | 103 | AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile |
90 | m4/Makefile doc/Makefile lib/Makefile mailbox/Makefile imap4d/Makefile | 104 | m4/Makefile doc/Makefile lib/Makefile mailbox/Makefile imap4d/Makefile | ... | ... |
-
Please register or sign in to post a comment