diff options
| -rw-r--r-- | config.mak.in | 6 | ||||
| -rw-r--r-- | configure.ac | 42 |
2 files changed, 46 insertions, 2 deletions
diff --git a/config.mak.in b/config.mak.in index 743b994c..66edf6c2 100644 --- a/config.mak.in +++ b/config.mak.in @@ -6,9 +6,15 @@ mandir = @mandir@ override PYTHON = @PYTHON@ override PG_CONFIG = @PG_CONFIG@ +# additional CPPFLAGS to pgxs modules +PG_CPPFLAGS = $(filter -DHAVE%, @DEFS@) + SQLDIR = $(prefix)/share/skytools PGXS = $(shell $(PG_CONFIG) --pgxs) DESTDIR = / +ASCIIDOC = @ASCIIDOC@ +XMLTO = @XMLTO@ + diff --git a/configure.ac b/configure.ac index 3652041e..63d95691 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl Find GNU make AC_MSG_CHECKING(for GNU make) if test ! -n "$MAKE"; then for a in make gmake gnumake; do - if "$a" --version 2>&1 | grep -q GNU; then + if "$a" --version 2>&1 | grep GNU > /dev/null; then MAKE="$a" break fi @@ -36,6 +36,44 @@ else fi AC_SUBST(MAKE) +dnl asciidoc >= 8.2 +AC_ARG_WITH(asciidoc, [ --with-asciidoc[[=prog]] path to asciidoc 8.2 (default: asciidoc)], +[ if test "$withval" = "yes"; then + AC_CHECK_PROGS(ASCIIDOC, [$ASCIIDOC asciidoc]) + else + AC_MSG_CHECKING(for asciidoc) + ASCIIDOC=$withval + AC_MSG_RESULT($ASCIIDOC) + fi ], +[ ASCIIDOC="" ]) + +if test -n "$ASCIIDOC"; then + AC_MSG_CHECKING([whether asciidoc version >= 8.2]) + ver=`$ASCIIDOC --version 2>&1 | sed -e 's/asciidoc //'` + case "$ver" in +dnl hack to make possible to use [, ] in regex +changequote({, })dnl + [0-7].*|8.[01]|8.[01].*) +changequote([, ])dnl + AC_MSG_RESULT([$ver, too old]) + ASCIIDOC="" + ;; + *) AC_MSG_RESULT([$ver, ok]) + ;; + esac +fi + +dnl check for xmlto, but only if asciidoc is found +if test -n "$ASCIIDOC"; then + AC_CHECK_PROGS(XMLTO, [$XMLTO xmlto]) +else + XMLTO="" +fi + +dnl Postres headers on Solaris define incompat unsetenv without that +AC_CHECK_FUNCS(unsetenv) + dnl Write result -AC_OUTPUT([config.mak]) +AC_CONFIG_FILES([config.mak]) +AC_OUTPUT |
