summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2021-01-17 19:03:18 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2021-01-17 19:03:18 +0000
commit4148417a2a0fdf2cc839568185150bb4a9203d5d (patch)
tree662c35abdf39b4fe94cae2a97abfe9be66df7751
parent607594f6e5836f2060aec690b49791ea1ef982d9 (diff)
PKG_CHECK_MODULES needs to be separate.
-rw-r--r--configure.ac64
1 files changed, 52 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index e70e3147..a2591857 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,17 +185,30 @@ AC_LIBOBJ(getopt)
# Look for libevent. Try libevent_core or libevent with pkg-config first then
# look for the library.
PKG_CHECK_MODULES(
- LIBEVENT,
- [libevent_core >= 2 libevent >= 2],
+ LIBEVENT_CORE,
+ [libevent_core >= 2],
[
- AM_CPPFLAGS="$LIBEVENT_CFLAGS $AM_CPPFLAGS"
+ AM_CPPFLAGS="$LIBEVENT_CORE_CFLAGS $AM_CPPFLAGS"
CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
- LIBS="$LIBEVENT_LIBS $LIBS"
+ LIBS="$LIBEVENT_CORE_LIBS $LIBS"
found_libevent=yes
],
found_libevent=no
)
if test x$found_libevent = xno; then
+ PKG_CHECK_MODULES(
+ LIBEVENT,
+ [libevent >= 2],
+ [
+ AM_CPPFLAGS="$LIBEVENT_CFLAGS $AM_CPPFLAGS"
+ CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
+ LIBS="$LIBEVENT_LIBS $LIBS"
+ found_libevent=yes
+ ],
+ found_libevent=no
+ )
+fi
+if test x$found_libevent = xno; then
AC_SEARCH_LIBS(
event_init,
[event_core event event-1.4],
@@ -221,16 +234,43 @@ fi
# Look for ncurses or curses. Try pkg-config first then directly for the
# library.
PKG_CHECK_MODULES(
- LIBNCURSES,
- [tinfo ncurses ncursesw],
- found_ncurses=yes,
+ LIBTINFO,
+ tinfo,
+ [
+ AM_CPPFLAGS="$LIBTINFO_CFLAGS $AM_CPPFLAGS"
+ CPPFLAGS="$LIBTINFO_CFLAGS $SAVED_CPPFLAGS"
+ LIBS="$LIBTINFO_LIBS $LIBS"
+ found_ncurses=yes
+ ],
found_ncurses=no
)
-if test "x$found_ncurses" = xyes; then
- AM_CPPFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $AM_CPPFLAGS"
- CPPFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $SAVED_CPPFLAGS"
- LIBS="$LIBNCURSES_LIBS $LIBTINFO_LIBS $LIBS"
-else
+if test "x$found_ncurses" = xno; then
+ PKG_CHECK_MODULES(
+ LIBNCURSES,
+ ncurses,
+ [
+ AM_CPPFLAGS="$LIBNCURSES_CFLAGS $AM_CPPFLAGS"
+ CPPFLAGS="$LIBNCURSES_CFLAGS $SAVED_CPPFLAGS"
+ LIBS="$LIBNCURSES_LIBS $LIBS"
+ found_ncurses=yes
+ ],
+ found_ncurses=no
+ )
+fi
+if test "x$found_ncurses" = xno; then
+ PKG_CHECK_MODULES(
+ LIBNCURSESW,
+ ncursesw,
+ [
+ AM_CPPFLAGS="$LIBNCURSESW_CFLAGS $AM_CPPFLAGS"
+ CPPFLAGS="$LIBNCURSESW_CFLAGS $SAVED_CPPFLAGS"
+ LIBS="$LIBNCURSESW_LIBS $LIBS"
+ found_ncurses=yes
+ ],
+ found_ncurses=no
+ )
+fi
+if test "x$found_ncurses" = xno; then
AC_SEARCH_LIBS(
setupterm,
[tinfo ncurses ncursesw],