Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
bc5d4698
Commit
bc5d4698
authored
Feb 26, 2018
by
Michael Klein
Committed by
Hisham Muhammad
Feb 26, 2018
Browse files
use CFLAGS from ncurses*-config, if present (#745)
Fixes #695.
parent
c01f40eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
bc5d4698
...
@@ -164,19 +164,25 @@ m4_define([HTOP_CHECK_SCRIPT],
...
@@ -164,19 +164,25 @@ m4_define([HTOP_CHECK_SCRIPT],
[
[
if test ! -z "m4_toupper($HTOP_[$1]_CONFIG_SCRIPT)"; then
if test ! -z "m4_toupper($HTOP_[$1]_CONFIG_SCRIPT)"; then
# to be used to set the path to ncurses*-config when cross-compiling
# to be used to set the path to ncurses*-config when cross-compiling
htop_config_script=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
htop_config_script_libs=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
htop_config_script_cflags=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --cflags 2> /dev/null)
else
else
htop_config_script=$([$4] --libs 2> /dev/null)
htop_config_script_libs=$([$4] --libs 2> /dev/null)
htop_config_script_cflags=$([$4] --cflags 2> /dev/null)
fi
fi
htop_script_success=no
htop_script_success=no
htop_save_LDFLAGS="$LDFLAGS"
htop_save_LDFLAGS="$LDFLAGS"
if test ! "x$htop_config_script" = x; then
htop_save_CFLAGS="$CFLAGS"
LDFLAGS="$htop_config_script $LDFLAGS"
if test ! "x$htop_config_script_libs" = x; then
LDFLAGS="$htop_config_script_libs $LDFLAGS"
CFLAGS="$htop_config_script_cflags $CFLAGS"
AC_CHECK_LIB([$1], [$2], [
AC_CHECK_LIB([$1], [$2], [
AC_DEFINE([$3], 1, [The library is present.])
AC_DEFINE([$3], 1, [The library is present.])
LIBS="$htop_config_script $LIBS "
LIBS="$htop_config_script
_libs
$LIBS "
htop_script_success=yes
htop_script_success=yes
], [])
], [
CFLAGS="$htop_save_CFLAGS"
])
LDFLAGS="$htop_save_LDFLAGS"
LDFLAGS="$htop_save_LDFLAGS"
fi
fi
if test "x$htop_script_success" = xno; then
if test "x$htop_script_success" = xno; then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment