172 AC_ARG_ENABLE(readline, |
172 AC_ARG_ENABLE(readline, |
173 [ --enable-readline use GNU readline in test program [default=yes]], |
173 [ --enable-readline use GNU readline in test program [default=yes]], |
174 , enable_readline=yes) |
174 , enable_readline=yes) |
175 if test x$enable_readline = xyes; then |
175 if test x$enable_readline = xyes; then |
176 AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes) |
176 AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes) |
177 AC_CHECK_LIB(readline, readline, have_readline_lib=yes) |
177 AC_CHECK_LIB(readline, readline, have_readline_lib=yes, , -lcurses) |
178 AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes) |
178 AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes) |
179 AC_CHECK_LIB(readline, add_history, have_history_lib=yes) |
179 AC_CHECK_LIB(readline, add_history, have_history_lib=yes, , -lcurses) |
180 if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then |
180 if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then |
181 if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then |
181 if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then |
182 AC_DEFINE(PHYSFS_HAVE_READLINE) |
182 AC_DEFINE(PHYSFS_HAVE_READLINE) |
183 LIBS="$LIBS -lreadline" |
183 LIBS="$LIBS -lreadline -lcurses" |
184 fi |
184 fi |
185 fi |
185 fi |
186 fi |
186 fi |
187 |
187 |
188 |
188 |