Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
47ad15cd
Commit
47ad15cd
authored
Mar 18, 2010
by
Jan Djärv
Browse files
Check for tputs and friends, abort if not found (bug #5735)
parent
c70815f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
21 deletions
+60
-21
configure
configure
+50
-20
configure.in
configure.in
+10
-1
No files found.
configure
View file @
47ad15cd
...
...
@@ -21058,14 +21058,14 @@ done
# That is because we have not set up to link ncurses in lib-src.
# It's better to believe a function is not available
# than to expect to find it in ncurses.
{ $as_echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
$as_echo_n "checking for tparm in -lncurses... " >&6; }
if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
# Also we need tputs and frieds to be able to build at all.
have_tputs_et_al=true
{ $as_echo "$as_me:$LINENO: checking for library containing tputs" >&5
$as_echo_n "checking for library containing tputs... " >&6; }
if test "${ac_cv_search_tputs+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
...
...
@@ -21079,16 +21079,23 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
char tp
arm
();
char tp
uts
();
int
main ()
{
return tp
arm
();
return tp
uts
();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
for ac_lib in '' ncurses terminfo termcap; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
...
...
@@ -21109,29 +21116,52 @@ $as_echo "$ac_try_echo") >&5
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_
lib_ncurses_tparm=y
es
ac_cv_
search_tputs=$ac_r
es
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ncurses_tparm=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
conftest$ac_exeext
if test "${ac_cv_search_tputs+set}" = set; then
break
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
$as_echo "$ac_cv_lib_ncurses_tparm" >&6; }
if test $ac_cv_lib_ncurses_tparm = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNCURSES 1
_ACEOF
done
if test "${ac_cv_search_tputs+set}" = set; then
:
else
ac_cv_search_tputs=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_tputs" >&5
$as_echo "$ac_cv_search_tputs" >&6; }
ac_res=$ac_cv_search_tputs
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
LIBS="-lncurses $LIBS"
else
have_tputs_et_al=false
fi
if test "$have_tputs_et_al" != true; then
{ { $as_echo "$as_me:$LINENO: error: I couldn't find termcap functions (tputs and friends).
Maybe some development libraries/packages are missing? Try installing
libncurses-dev(el), libterminfo-dev(el) or similar." >&5
$as_echo "$as_me: error: I couldn't find termcap functions (tputs and friends).
Maybe some development libraries/packages are missing? Try installing
libncurses-dev(el), libterminfo-dev(el) or similar." >&2;}
{ (exit 1); exit 1; }; }
fi
# Must define this when any termcap library is found.
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBNCURSES 1
_ACEOF
# Do we have res_init, for detecting changes in /etc/resolv.conf?
...
...
configure.in
View file @
47ad15cd
...
...
@@ -2393,7 +2393,16 @@ AC_CHECK_FUNCS(getpt)
# That is because we have not set up to link ncurses in lib-src.
# It's better to believe a function is not available
# than to expect to find it in ncurses.
AC_CHECK_LIB(ncurses, tparm)
# Also we need tputs and frieds to be able to build at all.
have_tputs_et_al=true
AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap], , have_tputs_et_al=false)
if test "$have_tputs_et_al" != true; then
AC_MSG_ERROR([I couldn't find termcap functions (tputs and friends).
Maybe some development libraries/packages are missing? Try installing
libncurses-dev(el), libterminfo-dev(el) or similar.])
fi
# Must define this when any termcap library is found.
AC_DEFINE(HAVE_LIBNCURSES)
# Do we have res_init, for detecting changes in /etc/resolv.conf?
...
...
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