From 7d53b918a64292abd43b5a4458dbd5023eebbb9e Mon Sep 17 00:00:00 2001 From: thib Date: Thu, 24 May 2001 19:56:13 +0000 Subject: [PATCH] use $prefix/share/{man|doc} as default (instead of $prefix/{man|doc} --- configure.in | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/configure.in b/configure.in index 2c359a5..1ee160d 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ -dnl Process this file with autoconf to produce a configure script. +nl Process this file with autoconf to produce a configure script. AC_INIT(allow.c) if test \( "$prefix" = "NONE" \) -o \( -z "$prefix" \); then - prefix="/usr/" + prefix="/usr" fi AC_PREFIX_DEFAULT($prefix) AC_CONFIG_HEADER(config.h) @@ -339,15 +339,15 @@ AC_ARG_WITH(docdir, AC_MSG_ERROR(Need DOCDIR.) ;; yes) - if test -d "$prefix/doc" ; then - docdir="$prefix/doc" - AC_MSG_RESULT($prefix/doc) - elif test -d "$prefix/share/doc" ; then - docdir="$prefix/share/doc" - AC_MSG_RESULT($prefix/share/doc) - elif test -d "$prefix/local/share/doc" ; then - docdir="$prefix/local/share/doc" - AC_MSG_RESULT($prefix/local/share/doc) + if test -d "${prefix}/share/doc" ; then + docdir="${prefix}/share/doc" + AC_MSG_RESULT(${prefix}/share/doc) + elif test -d "${prefix}/doc" ; then + docdir="${prefix}/doc" + AC_MSG_RESULT(${prefix}/doc) + elif test -d "${prefix}/local/share/doc" ; then + docdir="${prefix}/local/share/doc" + AC_MSG_RESULT(${prefix}/local/share/doc) else AC_MSG_ERROR(Cannot determine value for doc directory: try option --with-docdir=PATH) fi @@ -357,15 +357,15 @@ AC_ARG_WITH(docdir, AC_MSG_RESULT($withval) ;; esac ], - if test -d "$prefix/doc" ; then - docdir="$prefix/doc" - AC_MSG_RESULT($prefix/doc) - elif test -d "$prefix/share/doc" ; then - docdir="$prefix/share/doc" - AC_MSG_RESULT($prefix/share/doc) - elif test -d "$prefix/local/share/doc" ; then - docdir="$prefix/local/share/doc" - AC_MSG_RESULT($prefix/local/share/doc) + if test -d "${prefix}/share/doc" ; then + docdir="${prefix}/share/doc" + AC_MSG_RESULT(${prefix}/share/doc) + elif test -d "${prefix}/doc" ; then + docdir="${prefix}/doc" + AC_MSG_RESULT(${prefix}/doc) + elif test -d "${prefix}/local/share/doc" ; then + docdir="${prefix}/local/share/doc" + AC_MSG_RESULT(${prefix}/local/share/doc) else AC_MSG_ERROR(Cannot determine value for doc directory: try option --with-docdir=PATH) fi @@ -374,6 +374,15 @@ DOCDIR="$docdir" AC_DEFINE_UNQUOTED(DOCDIR, "$docdir") AC_SUBST(DOCDIR) +dnl Check if --mandir option has been used +if test "$mandir" = "\${prefix}/man"; then + if test -d ${prefix}/share/man; then + mandir=${prefix}/share/man + fi + AC_SUBST(mandir) + AC_DEFINE_UNQUOTED(mandir, "$mandir") +fi + AC_MSG_CHECKING(automatic answer to make install's questions) AC_ARG_WITH(answer-all, [ --with-answer-all=[yes|no] Answer the argument to every make install's questions.], -- 2.40.0