Skip to contentSkip to conversation

cifs-utils: allow specifying rootsbindir at configure time

PATCH In review Jeff Layton 1 participant 2 messages Feb 8, 2012 – Feb 12, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs-utils: allow specifying rootsbindir at configure time

...via the $ROOTSBINDIR environment variable, and AC_ARG_VAR macro. The default is to use /sbin for this value, which only currently affects the installation location of mount.cifs.

---
 Makefile.am  |    2 +-
 configure.ac |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 6182965..924c99e 100644
@@ -1,7 +1,7 @@
 AM_CFLAGS = -Wall -Wextra
 ACLOCAL_AMFLAGS = -I aclocal
 
-root_sbindir = "/sbin"
+root_sbindir = $(ROOTSBINDIR)
 root_sbin_PROGRAMS = mount.cifs
 mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
 mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
configure.ac +9 -1
index 4c715ab..02b1ef2 100644
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR(aclocal)
 
 AM_INIT_AUTOMAKE
 
-# "with" options
+# "enable" options
 AC_ARG_ENABLE(cifsupcall,
 	[AC_HELP_STRING([--enable-cifsupcall],
 			[Create cifs.upcall binary @<:@default=yes@:>@])],
@@ -34,6 +34,14 @@ AC_ARG_ENABLE(cifsacl,
 	enable_cifsacl=$enableval,
 	enable_cifsacl="maybe")
 
+# check for ROOTSBINDIR environment var
+if test -z $ROOTSBINDIR; then
+	ROOTSBINDIR="/sbin"
+	export ROOTSBINDIR
+fi
+
+AC_ARG_VAR(ROOTSBINDIR, [Location where files ordinarily under /sbin should be installed. Note: unaffected by --prefix. @<:@default=/sbin@:>@])
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_SED
Signature · 1 line
1.7.7.6

A message that is not in the archive (sent off-list or not yet received): 1328720579-31585-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org

#2 lore raw
Quoted 41 lines · On Wed, 8 Feb 2012 12:02:59 -0500 Jeff Layton…

...via the $ROOTSBINDIR environment variable, and AC_ARG_VAR macro. The default is to use /sbin for this value, which only currently affects the installation location of mount.cifs.

---
 Makefile.am  |    2 +-
 configure.ac |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 6182965..924c99e 100644
@@ -1,7 +1,7 @@
 AM_CFLAGS = -Wall -Wextra
 ACLOCAL_AMFLAGS = -I aclocal
 
-root_sbindir = "/sbin"
+root_sbindir = $(ROOTSBINDIR)
 root_sbin_PROGRAMS = mount.cifs
 mount_cifs_SOURCES = mount.cifs.c mtab.c resolve_host.c util.c
 mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
configure.ac +2 -1
index 4c715ab..02b1ef2 100644
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR(aclocal)
 
 AM_INIT_AUTOMAKE
 
-# "with" options
+# "enable" options
 AC_ARG_ENABLE(cifsupcall,
 	[AC_HELP_STRING([--enable-cifsupcall],
 			[Create cifs.upcall binary @<:@default=yes@:>@])],
@@ -34,6 +34,14 @@ AC_ARG_ENABLE(cifsacl,
 	enable_cifsacl=$enableval,
 	enable_cifsacl="maybe")
 
+# check for ROOTSBINDIR environment var

configure.ac AC_ARG_ENABLE(cifsacl, · line 47

Quoted 10 lines
configure.ac +7 -0
+if test -z $ROOTSBINDIR; then
+	ROOTSBINDIR="/sbin"
+	export ROOTSBINDIR
+fi
+
+AC_ARG_VAR(ROOTSBINDIR, [Location where files ordinarily under /sbin should be installed. Note: unaffected by --prefix. @<:@default=/sbin@:>@])
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_SED

Committed...

Signature · 1 line
Jeff Layton <[email protected]>