mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
Added configure option to specify the default pager for occtl.
This commit is contained in:
@@ -155,6 +155,15 @@ if [ test "$anyconnect_enabled" = "yes" ];then
|
||||
AC_DEFINE([ANYCONNECT_CLIENT_COMPAT], [], [Enable Anyconnect compatibility])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(pager,
|
||||
AS_HELP_STRING([--with-pager], [set a specific pager for occtl]),
|
||||
occtl_pager=$withval)
|
||||
if [ test -z "$occtl_pager" ];then
|
||||
AC_DEFINE([OCCTL_PAGER], [less], [The default pager for occtl])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([OCCTL_PAGER], ["$occtl_pager"], [The default pager for occtl])
|
||||
fi
|
||||
|
||||
dnl Test for http_parser library
|
||||
with_local_http_parser=yes
|
||||
LIBS="$oldlibs -lhttp_parser"
|
||||
|
||||
+1
-3
@@ -26,8 +26,6 @@
|
||||
#include <unistd.h>
|
||||
#include <occtl.h>
|
||||
|
||||
#define DEFAULT_PAGER "less"
|
||||
|
||||
static const char* get_pager(void)
|
||||
{
|
||||
char* pager;
|
||||
@@ -35,7 +33,7 @@ char* pager;
|
||||
if (pager == NULL)
|
||||
pager = getenv("PAGER");
|
||||
if (pager == NULL)
|
||||
pager = DEFAULT_PAGER;
|
||||
pager = OCCTL_PAGER;
|
||||
|
||||
return pager;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user