Skip to content

Commit

Permalink
configure.ac, src/Makefile.am: Follow GNU coding standards regarding …
Browse files Browse the repository at this point in the history
…directory variables

According to Sam, if we just remove the definitions, autotools will
provide the right values.

Note that this changes the default from /usr to /usr/local, which is the
right value according to the GNU conding standards (and also what the
BSDs prefer, according to one conversation I had with Ingo Schwarze from
OpenBSD).

Closes: <shadow-maint#1229>
Link: <https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Default-Prefix.html>
Reported-by: Chris Hofstaedtler <[email protected]>
Cc: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar committed Feb 26, 2025
1 parent 77eb67d commit 6f4e5d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ AC_SUBST([LIBSUBID_ABI_MINOR], [libsubid_abi_minor])
AC_SUBST([LIBSUBID_ABI_MICRO], [libsubid_abi_micro])
AC_SUBST([LIBSUBID_ABI], [libsubid_abi])

dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix=""

AC_USE_SYSTEM_EXTENSIONS

AC_ENABLE_STATIC
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
EXTRA_DIST = \
.indent.pro

ubindir = ${prefix}/bin
usbindir = ${prefix}/sbin
ubindir = ${exec_prefix}/bin
usbindir = ${exec_prefix}/sbin
suidperms = 4755
sgidperms = 2755

Expand All @@ -24,7 +24,7 @@ AM_CFLAGS = $(LIBBSD_CFLAGS)
#
# also /lib/libshadow.so.x.xx (if any) could be moved to /usr/lib
# and installation would be much simpler (just two directories,
# $prefix/bin and $prefix/sbin, no install-data hacks...)
# $exec_prefix/bin and $exec_prefix/sbin, no install-data hacks...)

bin_PROGRAMS = login
sbin_PROGRAMS = nologin
Expand Down

0 comments on commit 6f4e5d6

Please sign in to comment.