commit d9e4d43f37814a1e0752ec2b6bae2882b69fa569 from: Thomas Adam date: Thu Mar 03 20:38:04 2022 UTC portable: improve panelw detection Rather than making certain checks for panelw dependant on the underlying operating system, actually use pkg-config's detection mechanism properly. This makes the checking for panelw much easier and broader for other OSes which might have either panelw or gnupanelw. commit - a3732bb6b798b7e4979938729f9047ebf6191027 commit + d9e4d43f37814a1e0752ec2b6bae2882b69fa569 blob - 9768907e1618da91b009fb8a54357638500a9551 blob + 0fcc14025d7c44abbf983ad62bf4c5cc19332c91 --- configure.ac +++ configure.ac @@ -381,21 +381,21 @@ AC_LINK_IFELSE([AC_LANG_SOURCE( AC_MSG_RESULT(no) ) -if test "$PLATFORM" = "linux"; then - PKG_CHECK_MODULES( - LIBPANELW, - panelw, - found_panel=yes, - AC_MSG_ERROR("*** couldn't find -lpanel from ncurses") - ) -elif test "$PLATFORM" = "netbsd"; then - PKG_CHECK_MODULES( - LIBPANELW, - gnupanelw, - found_panel=yes, - AC_MSG_ERROR("*** couldn't find -lgnupanelw from ncurses") - ) -else +PKG_CHECK_MODULES( + LIBPANELW, + panelw, + found_panel=yes, + found_panel=no +) + +PKG_CHECK_MODULES( + LIBPANELW, + gnupanelw, + found_panel=yes, + found_panel=no +) + +if test "x$found_panel" = "xno"; then AC_CHECK_LIB(panelw, update_panels,, AC_MSG_ERROR([ "*** panelw not found for ncurses. ***"]) )