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>
-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)\"
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