# HG changeset patch # User Eric BĂ©nard # Date 1366842445 -7200 # Node ID e017e46b14349e7a9b9afb75315faa0f9b23e1f8 # Parent 8f88f4290b22222ed2880b9a99318b57409a4070 configure: add a variable to allow openpty check to be cached Signed-off-by: Dengke Du diff -r 8f88f4290b22 -r e017e46b1434 configure.ac --- a/configure.ac Tue Jun 27 22:42:32 2017 +0800 +++ b/configure.ac Thu Apr 25 00:27:25 2013 +0200 @@ -269,15 +269,20 @@ AC_MSG_NOTICE(Not using openpty) else AC_MSG_NOTICE(Using openpty if available) - AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY,1,[Have openpty() function])]) + AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) fi ], [ AC_MSG_NOTICE(Using openpty if available) - AC_SEARCH_LIBS(openpty, util, [AC_DEFINE(HAVE_OPENPTY)]) + AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) ] ) - + +if test "x$dropbear_cv_func_have_openpty" = "xyes"; then + AC_DEFINE(HAVE_OPENPTY,,Have openpty() function) + no_ptc_check=yes + no_ptmx_check=yes +fi AC_ARG_ENABLE(syslog, [ --disable-syslog Don't include syslog support],