Skip to content

Commit

Permalink
fix configure when --disable-ncurses is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Jul 13, 2012
1 parent 974cc40 commit a016409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID

/* Define to 1 if you have the <curses.h> header file. */
#undef HAVE_CURSES_H

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ AM_PROG_CC_C_O
AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])

AC_ARG_ENABLE(ncurses, [AC_HELP_STRING([--enable-ncurses], [use ncurses (switch to low-level hacks if disabled)])],, enable_ncurses="yes")
extra_headers=
if test "x$enable_ncurses" = xyes
then
AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"])
AC_CHECK_HEADERS([curses.h],[:], [missing_headers="$missing_headers $ac_header"])
extra_headers=curses.h
fi

if test ! -z "$missing_libraries"; then
Expand All @@ -28,7 +29,7 @@ fi
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([limits.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/time.h unistd.h],[:],[
AC_CHECK_HEADERS([limits.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/time.h unistd.h $extra_headers],[:],[
missing_headers="$missing_headers $ac_header"
])

Expand Down

0 comments on commit a016409

Please sign in to comment.