summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2007-04-24 18:02:21 +0000
committerNathan Kinder <nkinder@redhat.com>2007-04-24 18:02:21 +0000
commitf6ea31659e16dc61bf109e6f1bc5de49545a7003 (patch)
tree5c112610ded5a33d99ad841bcff4b34fdec117f2 /configure.ac
parent9385cdf0423d4d90a5288d0fc9137dcfe820a7c8 (diff)
downloadds-f6ea31659e16dc61bf109e6f1bc5de49545a7003.tar.gz
ds-f6ea31659e16dc61bf109e6f1bc5de49545a7003.tar.xz
ds-f6ea31659e16dc61bf109e6f1bc5de49545a7003.zip
Resolves: 236612
Summary: Added a configure option for FHS optional software layout style.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 30 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 13826904..6913711a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,9 +126,11 @@ AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
m4_include(m4/fhs.m4)
-# installation paths - by default, configure will just
-# use /usr as the prefix for everything, which means
-# /usr/etc and /usr/var. FHS sez to use /etc and /var.
+# installation paths - by default, we store everything
+# under the prefix. The with-fhs option will use /usr,
+# /etc, and /var. The with-fhs-opt option will use the
+# prefix, but it's sysconfdir and localstatedir will be
+# /etc/opt, and /var/opt.
if test "$with_fhs" = "yes"; then
ac_default_prefix=/usr
prefix=$ac_default_prefix
@@ -137,22 +139,39 @@ dnl as opposed to the default /usr/etc
sysconfdir='/etc'
dnl as opposed to the default /usr/var
localstatedir='/var'
+ # relative to datadir
+ sampledatadir=/$PACKAGE_NAME/data
+ # relative to datadir
+ scripttemplatedir=/$PACKAGE_NAME/script-templates
+ # relative to libdir
+ serverdir=/$PACKAGE_NAME
+ # relative to libdir
+ serverplugindir=/$PACKAGE_NAME/plugins
+else
+ if test "$with_fhs_opt" = "yes"; then
+ # Override sysconfdir and localstatedir if FHS optional
+ # package was requested.
+ sysconfdir='/etc/opt'
+ localstatedir='/var/opt'
+ fi
+ # Paths for default layout
+ # relative to datadir
+ sampledatadir=/data
+ # relative to datadir
+ scripttemplatedir=/script-templates
+ # relative to libdir
+ serverdir=
+ # relative to libdir
+ serverplugindir=/plugins
fi
+# Shared paths for both FHS and default layouts
# relative to sysconfdir
configdir=/$PACKAGE_NAME/config
-# relative to datadir
-sampledatadir=/$PACKAGE_NAME/data
# relative to sysconfdir
propertydir=/$PACKAGE_NAME/property
# relative to sysconfdir
schemadir=/$PACKAGE_NAME/schema
-# relative to libdir
-serverdir=/$PACKAGE_NAME
-# relative to libdir
-serverplugindir=/$PACKAGE_NAME/plugins
-# relative to datadir
-scripttemplatedir=/$PACKAGE_NAME/script-templates
AC_SUBST(configdir)
AC_SUBST(sampledatadir)