-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaths.m4
143 lines (121 loc) · 3.87 KB
/
paths.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
AC_DEFUN([AX_XEN_EXPAND_CONFIG], [
dnl expand these early so we can use this for substitutions
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix}
dnl Use /var instead of /usr/local/var because there can be only one
dnl xenstored active at a time. All tools have to share this dir, even
dnl if they come from a different --prefix=.
if test "$localstatedir" = '${prefix}/var' ; then
localstatedir=/var
fi
dnl expand exec_prefix or it will endup in substituted variables
bindir=`eval echo $bindir`
sbindir=`eval echo $sbindir`
libdir=`eval echo $libdir`
dnl
if test "x$sysconfdir" = 'x${prefix}/etc' ; then
case "$host_os" in
*freebsd*)
sysconfdir=$prefix/etc
;;
*solaris*)
if test "$prefix" = "/usr" ; then
sysconfdir=/etc
else
sysconfdir=$prefix/etc
fi
;;
*)
sysconfdir=/etc
;;
esac
fi
AC_ARG_WITH([initddir],
AS_HELP_STRING([--with-initddir=DIR],
[Path to directory with sysv runlevel scripts. [SYSCONFDIR/init.d]]),
[initddir_path=$withval],
[case "$host_os" in
*linux*)
if test -d $sysconfdir/rc.d/init.d ; then
initddir_path=$sysconfdir/rc.d/init.d
else
initddir_path=$sysconfdir/init.d
fi
;;
*)
initddir_path=$sysconfdir/rc.d
;;
esac])
AC_ARG_WITH([sysconfig-leaf-dir],
AS_HELP_STRING([--with-sysconfig-leaf-dir=SUBDIR],
[Name of subdirectory in /etc to store runtime options for runlevel
scripts and daemons such as xenstored.
This should be either "sysconfig" or "default". [sysconfig]]),
[config_leaf_dir=$withval],
[config_leaf_dir=sysconfig
if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi])
CONFIG_LEAF_DIR=$config_leaf_dir
AC_SUBST(CONFIG_LEAF_DIR)
dnl autoconf docs suggest to use a "package name" subdir. We make it
dnl configurable for the benefit of those who want e.g. xen-X.Y instead.
AC_ARG_WITH([libexec-leaf-dir],
AS_HELP_STRING([--with-libexec-leaf-dir=SUBDIR],
[Name of subdirectory in libexecdir to use.]),
[libexec_subdir=$withval],
[libexec_subdir=$PACKAGE_TARNAME])
AC_ARG_WITH([xen-dumpdir],
AS_HELP_STRING([--with-xen-dumpdir=DIR],
[Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]),
[xen_dumpdir_path=$withval],
[xen_dumpdir_path=$localstatedir/lib/xen/dump])
if test "$libexecdir" = '${exec_prefix}/libexec' ; then
case "$host_os" in
*netbsd*) ;;
*)
libexecdir='${exec_prefix}/lib'
;;
esac
fi
dnl expand exec_prefix or it will endup in substituted variables
LIBEXEC=`eval echo $libexecdir/$libexec_subdir`
AC_SUBST(LIBEXEC)
dnl These variables will be substituted in various .in files
LIBEXEC_BIN=${LIBEXEC}/bin
AC_SUBST(LIBEXEC_BIN)
LIBEXEC_LIB=${LIBEXEC}/lib
AC_SUBST(LIBEXEC_LIB)
LIBEXEC_INC=${LIBEXEC}/include
AC_SUBST(LIBEXEC_INC)
XENFIRMWAREDIR=${LIBEXEC}/boot
AC_SUBST(XENFIRMWAREDIR)
XEN_RUN_DIR=$localstatedir/run/xen
AC_SUBST(XEN_RUN_DIR)
XEN_LOG_DIR=$localstatedir/log/xen
AC_SUBST(XEN_LOG_DIR)
XEN_LIB_STORED=$localstatedir/lib/xenstored
AC_SUBST(XEN_LIB_STORED)
XEN_RUN_STORED=$localstatedir/run/xenstored
AC_SUBST(XEN_RUN_STORED)
XEN_LIB_DIR=$localstatedir/lib/xen
AC_SUBST(XEN_LIB_DIR)
SHAREDIR=$prefix/share
AC_SUBST(SHAREDIR)
CONFIG_DIR=$sysconfdir
AC_SUBST(CONFIG_DIR)
INITD_DIR=$initddir_path
AC_SUBST(INITD_DIR)
XEN_CONFIG_DIR=$CONFIG_DIR/xen
AC_SUBST(XEN_CONFIG_DIR)
XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts
AC_SUBST(XEN_SCRIPT_DIR)
case "$host_os" in
*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;;
*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;;
*) XEN_LOCK_DIR=$localstatedir/lock ;;
esac
AC_SUBST(XEN_LOCK_DIR)
XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging
AC_SUBST(XEN_PAGING_DIR)
XEN_DUMP_DIR=$xen_dumpdir_path
AC_SUBST(XEN_DUMP_DIR)
])