diff options
-rw-r--r-- | acconfig.h | 4 | ||||
-rw-r--r-- | configure.in | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/acconfig.h b/acconfig.h index 28b0bb4e7..28c22fae8 100644 --- a/acconfig.h +++ b/acconfig.h @@ -19,3 +19,7 @@ #undef USE_LIBPAM #undef HAVE_SNPRINTF #undef WITH_PTHREAD + +/* Define if using libreadline */ +#undef WITH_READLINE + diff --git a/configure.in b/configure.in index 1ef6792d7..4b52cccb7 100644 --- a/configure.in +++ b/configure.in @@ -26,6 +26,14 @@ AC_ARG_ENABLE(pthread, *) AC_MSG_ERROR(bad value ${enableval} for --disable-pthread) ;; esac],[usepthread=yes]) +AC_ARG_WITH(readline, + [ --without-readline do not use readline], + [case "${withval}" in + yes) usereadline=yes ;; + no) usereadline=no ;; + *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; + esac],[usereadline=yes]) + dnl Check for headers AC_HEADER_STDC AC_HEADER_DIRENT @@ -85,6 +93,12 @@ AC_CHECK_FUNC(gethostbyname, [true], AC_CHECK_FUNC(socket, [true], AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS")) +dnl Check for readline +if test x"$usereadline" = x"yes"; then + AC_CHECK_LIB(readline, readline, + AC_CHECK_HEADERS(readline/readline.h, AC_DEFINE(WITH_READLINE))) +fi + dnl Output Makefiles AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile m4/Makefile doc/Makefile lib/Makefile mailbox/Makefile imap4d/Makefile |