diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-12-06 19:06:23 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-12-06 19:06:23 -0200 |
commit | c23770245e21eaac8b1d34fd4463e265f714b63f (patch) | |
tree | 3fdfb843a0980003e618438bc63689ff0b3df1b6 /configure.ac | |
parent | 96c929f82b811f054726f1ba3e5fd065976a1204 (diff) |
If ncurses*-config script is present, use it in configure
when testing for ncurses library. See #198.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 80180486..7fead7af 100644 --- a/configure.ac +++ b/configure.ac @@ -147,15 +147,22 @@ fi # HTOP_CHECK_NCURSES_LIBRARY(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART) m4_define([HTOP_CHECK_NCURSES_LIBRARY], [ + config_script=$([$4] --libs 2> /dev/null) + save_LDFLAGS="$LDFLAGS" + if test ! "x$config_script" = x; then + LDFLAGS="$config_script $LDFLAGS" + fi AC_CHECK_LIB([$1], [$2], [ AC_DEFINE([$3], 1, [The library is present.]) - config_script=$([$4] --libs 2> /dev/null) if test ! "x$config_script" = x; then LIBS="$config_script $LIBS " else LIBS="-l[$1] $LIBS " fi - ], [$5]) + LDFLAGS="$save_LDFLAGS" + ], [ + LDFLAGS="$save_LDFLAGS" + $5]) ]) AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes") |