diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2008-06-11 18:54:02 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2008-06-11 18:54:02 -0700 |
commit | 1cc0d042fb265bc429800f6e645ce997cbb05de9 (patch) | |
tree | a55b8bea0f5f8b9c40dad59a844545db9fabc04a | |
parent | cc52dd3cff043ccdb6c2dc3d477915c751945c78 (diff) |
Set the default installation directories appropriately
In the typical install, we want the data (man pages) to go to /usr, but
the programs to go in the root directory. This sets $prefix and
$exec_prefix appropriately if they have not been set by the user.
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 801a44b..da653b9 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,15 @@ if test "x$enable_werror" != xno; then fi fi +# Want programs in /sbin and symlinks in /lib/initd, but man pages +# in /usr/share by default +AC_PREFIX_DEFAULT([/usr]) +AC_MSG_CHECKING([for exec_prefix to use]) +if test "x$prefix" = xNONE && test "x$exec_prefix" = xNONE; then + exec_prefix='' +fi +AC_MSG_RESULT([\"$exec_prefix\"]) + AC_ARG_WITH([initd-dir], [AS_HELP_STRING([--with-initd-dir=DIR], [Set the default initd directory @<:@/etc/init.d@:>@])], diff --git a/src/Makefile.am b/src/Makefile.am index 7397139..3fb14c5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,7 +11,7 @@ remove_initd_LDADD = $(top_builddir)/lib/libinitd.la man_MANS = install_initd.8 remove_initd.8 # /lib/initd symlinks -libinitddir = $(libdir)/initd +libinitddir = $(exec_prefix)/lib/initd install-exec-hook: $(MKDIR_P) $(DESTDIR)$(libinitddir) rm -f $(DESTDIR)$(libinitddir)/install_initd |