aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2015-02-23 19:06:44 +0000
committerDRC <dcommander@users.sourceforge.net>2015-02-23 19:06:44 +0000
commitc69a1cd7a02d1554eaf6128732578f2bc64a1b3e (patch)
tree8fea17911d5b034651a299e3f04a40aa0a98187a
parent3b7015d5d88317c21876022b747ca5ec11e518f8 (diff)
downloadlibjpeg-turbo-c69a1cd7a02d1554eaf6128732578f2bc64a1b3e.tar.gz
If libjpeg-turbo is configured with a non-default prefix, such as /usr, then use the docdir variable defined by autoconf 2.60 and later, if available. This will, for instance, install the documentation under /usr/share/doc/libjpeg-turbo by default if prefix=/usr, unless docdir is overridden. When using earlier versions of autoconf, docdir is set to ${datadir}/doc, as it always has been.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1535 632fc199-4ca6-4c93-a231-07263d6284db
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac10
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 956f30df..fe5c3195 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,11 +158,10 @@ dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.txt \
ChangeLog.txt
-docdir = $(datadir)/doc
dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \
wizard.txt
-exampledir = $(datadir)/doc
+exampledir = $(docdir)
dist_example_DATA = example.c
diff --git a/configure.ac b/configure.ac
index 3105e218..f2b8cf2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,11 @@ DATADIR=`eval echo $DATADIR`
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
datarootdir='${prefix}'
fi
+DOCDIR=`eval echo ${docdir}`
+DOCDIR=`eval echo $DOCDIR`
+if test "$DOCDIR" = "/opt/libjpeg-turbo/doc/libjpeg-turbo"; then
+ docdir='${datadir}/doc'
+fi
old_exec_prefix=${exec_prefix}
if test "x$exec_prefix" = "xNONE"; then
@@ -538,6 +543,11 @@ case "$host_cpu" in
;;
esac
+if test "${docdir}" = ""; then
+ docdir=${datadir}/doc
+ AC_SUBST(docdir)
+fi
+
AC_SUBST(RPMARCH)
AC_SUBST(RPM_CONFIG_ARGS)
AC_SUBST(DEBARCH)