]> granicus.if.org Git - fcron/commitdiff
use $prefix/share/{man|doc} as default (instead of $prefix/{man|doc}
authorthib <thib>
Thu, 24 May 2001 19:56:13 +0000 (19:56 +0000)
committerthib <thib>
Thu, 24 May 2001 19:56:13 +0000 (19:56 +0000)
configure.in

index 2c359a53de156d1883e56e9364b763d461b17090..1ee160d27ecf878cf1e93c50178d933848949eac 100644 (file)
@@ -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.],