Use configure --sysconfdir=DIR to set CONFIG_DIR

Preserve existing behaviour: if the option was not given, set existing
defaults for FreeBSD, Solaris and everything else.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Add configure --with-initd-dir=DIR

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path

Helper scripts get installed into XEN_SCRIPT_DIR, but initscripts,
helper scripts and udev rules still refer to the hardcoded location
/etc/xen/scripts/. Update scripts, rules and Makefile to refer to
@XEN_SCRIPT_DIR@ instead.
Update configure.ac to substitute the path in files using XEN_SCRIPT_DIR.
Remove XEN_SCRIPT_DIR from StdGNU.mk and SunOS.mk, its already in
Paths.mk. Note: In SunOS.mk it refered to PRIVATE_PREFIX, which was
likely a typo introduced by 9f6d07bac9f14aaa8bafe38b4a217e61a3a57842
("tools: get rid of hardcoded config dirs")

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools/configure.ac: sort AC_CONFIG_FILES

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools: use INITD_DIR instead of CONFIG_DIR/init.d|rc.d

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools/hotplug: substitute XEN_SCRIPT_DIR on FreeBSD

Also remove DESTDIR from the path, this was most likely not intended.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
remove XEN_CONFIG_DIR from config

... because they are already in Paths.mk:
BINDIR, LIBEXEC, PRIVATE_BINDIR, PRIVATE_PREFIX, SBINDIR, SHAREDIR,
XEN_CONFIG_DIR, XEN_LOCK_DIR, XEN_PAGING_DIR, XEN_RUN_DIR. Remove unused
PKG_XEN_PREFIX, which was also incorrectly assigned to PRIVATE_PREFIX.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Add configure --enable-rpath

Signed-off-by: Olaf Hering <olaf@aepfle.de>
rerun autogen.sh

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools/mkrpm: allow custom rpm package name

Even if xen is configured and compiled with different --prefix= so that
it operates entirely below $prefix, the resulting package from 'make
rpmball' is always called "xen.rpm".

Use an environment name to give a different name.
This can be used like this:

suffix=-bugN
prefix=/opx/xen/staging${suffix}
./configure --prefix=${prefix}
make rpmball PKG_SUFFIX=${suffix}

The result will be "xen-bugN.rpm" instead of "xen.rpm". The benefit is that
many xen${suffix}.rpm packages can be installed at the same time.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
tools/xenpaging: create dumpdir with mode 0700

The swapfile contain sensitive guest info.

Signed-off-by: Olaf Hering <olaf@aepfle.de>