$NetBSD: patch-configure.ac,v 1.2 2024/02/27 19:13:43 schmonz Exp $ Don't build courier-imap, cgi, php, or python by default. Remove unused text-browser checks. --- configure.ac.orig 2015-09-01 16:03:21.000000000 +0000 +++ configure.ac @@ -1,4 +1,4 @@ -AC_INIT([vmailmgr], [0.97.1]) +AC_INIT([vmailmgr], [@PKGVERSION@]) AC_CONFIG_SRCDIR([lib/mergelib.sh]) AM_INIT_AUTOMAKE @@ -55,38 +55,48 @@ AC_PATH_PROG(RM, rm) AC_PATH_PROG(MKDIR, mkdir) AC_PATH_PROG(LN, ln) -AC_PATH_PROG(PYTHON, python2) +USE_PYTHON=no +AC_ARG_ENABLE(python, +[ --enable-python Install Python bindings.], +USE_PYTHON=$enableval) +PYTHON=@PYTHONBIN@ AC_CACHE_CHECK(Python library path, local_cv_python_lib_dir, [[if test -x "$PYTHON"; then - local_cv_python_lib_dir=`$PYTHON -c "import sys;print sys.path[1]"` + local_cv_python_lib_dir=`$PYTHON -c "import site;print(site.getsitepackages()[0])"` else local_cv_python_lib_dir=NONE fi]]) pythonlibdir="$local_cv_python_lib_dir/vmailmgr" AC_SUBST(pythonlibdir) -AM_CONDITIONAL(WANTPYTHON, test x$local_cv_python_lib_dir != xNONE) +AM_CONDITIONAL(WANTPYTHON, test "$USE_PYTHON" != no) -phpdir="/home/httpd/php" +USE_PHP=no +AC_ARG_ENABLE(php, +[ --enable-php Install PHP bindings.], +USE_PHP=$enableval) +phpdir='${prefix}/share/vmailmgr/php' AC_SUBST(phpdir) +AM_CONDITIONAL(WANTPHP, test "$USE_PHP" != no) -AC_PATH_PROG(W3M, w3m) -AC_PATH_PROG(LYNX, lynx) -if test "x$W3M" != x; then - echo Using w3m to format html pages. - HTML2TXT="w3m -dump" -elif test "x$LYNX" != x; then - echo Using lynx to format html pages. - HTML2TXT="lynx -dump -nolist" -else - echo "Can't find either w3m or lynx, building the plain text" - echo "documentation files will fail." - HTML2TXT="false" -fi -AC_SUBST(HTML2TXT) +USE_COURIER=no +AC_ARG_ENABLE(courier-imap, +[ --enable-courier-imap Install Courier-IMAP authenticator.], +USE_COURIER=$enableval) +AM_CONDITIONAL(WANTCOURIER, test "$USE_COURIER" != no) + +USE_CGI=no +AC_ARG_ENABLE(cgi, +[ --enable-cgi Install CGI programs.], +USE_CGI=$enableval) +cgidir='${prefix}/libexec/cgi-bin' +AC_SUBST(cgidir) +AM_CONDITIONAL(WANTCGI, test "$USE_CGI" != no) TODAY=`date +%Y-%m-%d` -POD2MAN="pod2man --release='vmailmgr ${VERSION}' --center='VMailMgr Tools Documentation' --date='${TODAY}'" -POD2HTML="pod2html --noindex" +AC_PATH_PROG(POD2MAN,pod2man) +POD2MAN="$POD2MAN --release='vmailmgr ${VERSION}' --center='VMailMgr Tools Documentation' --date='${TODAY}'" +AC_PATH_PROG(POD2HTML,pod2html) +POD2HTML="$POD2HTML --noindex" SUFFIXES="$SUFFIXES .1 .5 .7 .8 .pod .html .texi .txt .ps .fig .sgml .py .pyc .pyo" AC_SUBST(POD2MAN) AC_SUBST(POD2HTML) @@ -117,9 +127,6 @@ dnl Checks for library functions. AC_CHECK_FUNCS(gethostname gettimeofday mkdir putenv rmdir socket) AC_CHECK_FUNCS(srandom random crypt strcasestr) -cgidir='${prefix}/cgi-bin' -AC_SUBST(cgidir) - AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES(Makefile cgi/Makefile @@ -141,5 +148,5 @@ AC_CONFIG_FILES(Makefile lib/vpwtable/Makefile scripts/Makefile php/Makefile - python/Makefile) + python/vmailmgr/Makefile) AC_OUTPUT