From 83bb42801d4bc6340446402a2471040a8a974039 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 28 Aug 2011 23:15:29 +1000 Subject: [PATCH] Make pthread, libcurl and libcurses library checks mandatory or fail. --- configure.ac | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 679b7de1..de3153ab 100644 --- a/configure.ac +++ b/configure.ac @@ -72,11 +72,21 @@ AC_LINK_IFELSE( found_opencl=0]) LIBS=$SAVED_LIBS +AC_CHECK_LIB(pthread, pthread_create, , + AC_MSG_ERROR([Could not find pthread library - please install libpthread])) +PTHREAD_LIBS=-lpthread + AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true) -AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread) + +AC_SEARCH_LIBS(addstr, ncurses pdcurses, , + AC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev])) + AC_CHECK_LIB(ncurses, addstr, NCURSES_LIBS=-lncurses) AC_CHECK_LIB(pdcurses, addstr, PDCURSES_LIBS=-lpdcurses) +AC_CHECK_LIB(curl, curl_easy_init, , + AC_MSG_ERROR([Could not find curl library - please install libcurl-dev])) + AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue]) AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue]) AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue])