If we don't have ncurses.h don't try to look for libncurses
This commit is contained in:
18
configure.ac
18
configure.ac
@@ -189,9 +189,13 @@ AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \
|
|||||||
|
|
||||||
# We have to disable cdda_player unless we have either ncurses.h or
|
# We have to disable cdda_player unless we have either ncurses.h or
|
||||||
# curses.h
|
# curses.h
|
||||||
|
have_ncurses_h='no'
|
||||||
if test $enable_cdda_player = 'yes' ; then
|
if test $enable_cdda_player = 'yes' ; then
|
||||||
enable_cdda_player='no'
|
enable_cdda_player='no'
|
||||||
AC_CHECK_HEADERS(ncurses.h curses.h, enable_cdda_player='yes')
|
AC_CHECK_HEADERS(ncurses.h,
|
||||||
|
[enable_cdda_player='yes'; have_ncurses_h='yes'],
|
||||||
|
[AC_CHECK_HEADERS(curses.h,
|
||||||
|
enable_cdda_player='yes')])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FreeBSD 4 has getopt in unistd.h. So we include that before
|
# FreeBSD 4 has getopt in unistd.h. So we include that before
|
||||||
@@ -576,12 +580,20 @@ AC_SUBST(CDDB_LIBS)
|
|||||||
|
|
||||||
AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad])
|
AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad])
|
||||||
if test x"$enable_cdda_player" = xyes; then
|
if test x"$enable_cdda_player" = xyes; then
|
||||||
|
if test x"$have_ncurses_h" = xyes; then
|
||||||
AC_CHECK_LIB(ncurses, mvprintw,
|
AC_CHECK_LIB(ncurses, mvprintw,
|
||||||
[LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
|
[LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
|
||||||
AC_CHECK_LIB(curses, mvprintw,
|
AC_CHECK_LIB(curses, mvprintw,
|
||||||
[LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
|
[LIBCURSES=curses;
|
||||||
[AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses])
|
CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
|
||||||
|
[AC_MSG_WARN([Will not build cdda-player - did not find libncurses or libcurses])
|
||||||
enable_cdda_player=no]))
|
enable_cdda_player=no]))
|
||||||
|
else
|
||||||
|
AC_CHECK_LIB(curses, mvprintw,
|
||||||
|
[LIBCURSES=curses;
|
||||||
|
CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
|
||||||
|
[AC_MSG_WARN([Will not build cdda-player - did not find libcurses])])
|
||||||
|
fi
|
||||||
if test x"$enable_cdda_player" = xyes; then
|
if test x"$enable_cdda_player" = xyes; then
|
||||||
AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes])
|
AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes])
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user