X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=common.make.in;fp=common.make.in;h=5e0e80b32a0ae43ef6bce75b330489f4522a0de1;hp=46add1c3585b5d74a57cccdb76224bf94b208288;hb=489381f9e19e486dd28d2a59631f6cbbfd670db0;hpb=ab9603b004ef2bfd1c3450b915320b45a07f58c8 diff --git a/common.make.in b/common.make.in index 46add1c..5e0e80b 100644 --- a/common.make.in +++ b/common.make.in @@ -45,11 +45,22 @@ MKSHLIB_1= @MKSHLIB_1@ MKSHLIB_2= @MKSHLIB_2@ MKSHLIB_3= @MKSHLIB_3@ -prefix= @prefix@ -exec_prefix= @exec_prefix@ -bindir= @bindir@ -libdir= @libdir@ -includedir= @includedir@ +prefix := @prefix@ +exec_prefix := @exec_prefix@ +bindir := @bindir@ +libdir := @libdir@ +includedir := @includedir@ + +ifneq ($(DESTDIR),) +# autoconf likes to define some of these in terms of each other +# so if we want to add a prefix to each one we have to do it this way: +destdir_prefix=$(DESTDIR)/ +prefix := ${destdir_prefix}${prefix} +exec_prefix := ${destdir_prefix}${exec_prefix} +bindir := ${destdir_prefix}${bindir} +libdir := ${destdir_prefix}${libdir} +includedir := ${destdir_prefix}${includedir} +endif AC_INSTALL= @INSTALL@ ifeq ($(AC_INSTALL),./install-sh -c)