From 0d927a66dd793e15cd24294ab9f0a7c8b9953e9c Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sun, 21 May 2023 15:15:49 +0200 Subject: Add kontext --- configure.ac | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..d217716 --- /dev/null +++ b/configure.ac @@ -0,0 +1,40 @@ +AC_INIT([kontext], [1.0.0], [christian@segundo.io]) +AM_INIT_AUTOMAKE([foreign no-dependencies]) +AC_CONFIG_FILES([Makefile]) + +AC_SUBST([CC]) + +AC_PATH_PROG([ENV_ABSOLUTE_PATH], [env]) +AS_IF([test x"$ENV_ABSOLUTE_PATH" = x""], [AC_MSG_ERROR([env is not available])]) +AC_SUBST([ENV_ABSOLUTE_PATH]) + +AC_CHECK_PROG(BASH_CHECK,bash,yes) +AC_CHECK_PROG(KUBECTL_CHECK,kubectl,yes) +AC_CHECK_PROG(MKTEMP_CHECK,mktemp,yes) +AS_IF([test x"$BASH_CHECK" != x"yes"], [AC_MSG_ERROR([bash is not available])]) +AS_IF([test x"$KUBECTL_CHECK" != x"yes"], [AC_MSG_ERROR([kubectl is not available])]) +AS_IF([test x"$MKTEMP_CHECK" != x"yes"], [AC_MSG_ERROR([mktemp is not available])]) + +AC_CACHE_CHECK([for GNU getopt], [ac_cv_path_gnu_getopt], + [AC_PATH_PROGS_FEATURE_CHECK([gnu_getopt], [getopt], + [[output=`$ac_path_gnu_getopt -V | grep util-linux` + test -n "$output" \ + && ac_cv_path_gnu_getopt=$ac_path_gnu_getopt]], + [AC_MSG_ERROR([could not find getopt from util-linux])])]) +AC_SUBST([GNU_GETOPT], [$ac_cv_path_gnu_getopt]) + +AC_ARG_WITH([zsh-completion-dir], + AS_HELP_STRING([--with-zsh-completion-dir[=PATH]], + [Install the zsh auto-completion script in this directory. @<:@default=yes@:>@]), + [], + [with_zsh_completion_dir=yes]) +AS_IF([test "x$with_zsh_completion_dir" = "xyes"], + [ZSH_COMPLETION_DIR="$datadir/zsh/site-functions"], + [ZSH_COMPLETION_DIR="$with_zsh_completion_dir"]) + +AC_SUBST([ZSH_COMPLETION_DIR]) +AM_CONDITIONAL([ENABLE_ZSH_COMPLETION], [test "x$with_zsh_completion_dir" != "xno"]) + +AC_CONFIG_FILES([kontext], [chmod +x kontext]) + +AC_OUTPUT -- cgit v1.2.3