diff options
author | Stepan Kasal | 2007-05-15 20:46:24 +0200 |
---|---|---|
committer | Karel Zak | 2007-05-16 11:43:30 +0200 |
commit | 15a9b48cf5a8e33e0f64070ca190c6eda586f8b8 (patch) | |
tree | 56f2318b1c907bc42012b801116e1d76ac443bdf | |
parent | build-sys: set DISTCHECK_CONFIGURE_FLAGS in top-level makefile (diff) | |
download | kernel-qcow2-util-linux-15a9b48cf5a8e33e0f64070ca190c6eda586f8b8.tar.gz kernel-qcow2-util-linux-15a9b48cf5a8e33e0f64070ca190c6eda586f8b8.tar.xz kernel-qcow2-util-linux-15a9b48cf5a8e33e0f64070ca190c6eda586f8b8.zip |
build-sys: --prefix defaults to /usr
Use prefix=/usr as the default setting. If prefix is /usr, make
bindir and sbindir default to /bin and /sbin, respectively.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
-rw-r--r-- | config/include-Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 16 |
2 files changed, 18 insertions, 6 deletions
diff --git a/config/include-Makefile.am b/config/include-Makefile.am index 6e306556f..eea8e256b 100644 --- a/config/include-Makefile.am +++ b/config/include-Makefile.am @@ -1,8 +1,6 @@ -usrbinexecdir = $(prefix)/usr/bin -usrsbinexecdir = $(prefix)/usr/sbin -datadir = $(prefix)/usr/share -infodir = $(datadir)/info -mandir = $(datadir)/man +# The original default vaues of bindir and sbindir: +usrbinexecdir = ${exec_prefix}/bin +usrsbinexecdir = ${exec_prefix}/sbin AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \ -DLOCALEDIR=\"$(localedir)\" diff --git a/configure.ac b/configure.ac index a457cc130..b9e5a90d0 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,21 @@ AM_INIT_AUTOMAKE([check-news -Wall foreign 1.9]) AC_CONFIG_SRCDIR(mount/mount.c) -AC_PREFIX_DEFAULT(/) +AC_PREFIX_DEFAULT([/usr]) + +# Check whether exec_prefix=/usr: +case $exec_prefix:$prefix in +NONE:NONE | NONE:/usr | /usr:*) + AC_MSG_NOTICE([Default --exec-prefix detected.]) + case $bindir in + '${exec_prefix}/bin') bindir=/bin + AC_MSG_NOTICE([ --bindir defaults to /bin]) ;; + esac + case $sbindir in + '${exec_prefix}/sbin') sbindir=/sbin + AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;; + esac ;; +esac AC_PROG_CC_STDC AC_PROG_LIBTOOL |