1 # MCONFIG -- Configuration stuff for util-linux
2 # Created: Sat Feb 4 15:50:30 1995
3 # Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
5 # For a user-mode install, make (at least) three changes:
6 # - remove the `-o root' part in INSTALLSUID
7 # - set USE_TTY_GROUP=no
10 # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
11 # Select for CPU i386 if the binaries must be able to run on an intel 386
12 # (by default i486 code is generated, see below)
14 ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
16 # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
17 # will use PAM for authentication. Additionally, passwd will not be
18 # installed as it is not PAM aware.
21 # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
22 # and vipw will not be built or installed from the login-utils
26 # If HAVE_PASSWD is set to "yes", then passwd will not be built or
27 # installed from the login-utils subdirectory (but login, chfn, chsh,
28 # newgrp, and vipw *will* be installed).
31 # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
32 # non-root users to enter the account password before updating /etc/passwd.
36 # If you use chsh from this package, ONLY_LISTED_SHELLS will require that
37 # the selected shell be listed in /etc/shells -- otherwise only a warning is
38 # printed. This prevents someone from setting their shell to /bin/false.
39 ONLY_LISTED_SHELLS=yes
40 #ONLY_LISTED_SHELLS=no
43 # If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
44 # be built or installed from the login-utils subdirectory. (The shutdown
45 # and halt that come with the SysVinit package should be used with the init
46 # found in that package.)
49 # If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
50 # not be built or installed from the login-utils subdirectory. (The
51 # shutdown and init from the SysVinit package do not depend on the last,
52 # mesg, and wall from that package.)
53 HAVE_SYSVINIT_UTILS=no
55 # If HAVE_WRITE is set to "yes", then write will not be built or
56 # installed from the misc-utils subdirectory.
57 # (There is a network aware write in netwrite from NetKit 0.16 or later.)
60 # If HAVE_GETTY is set to "yes", then agetty will not be built or
61 # installed from the login-utils subdirectory. Note that agetty can
62 # co-exist with other gettys, so this option should never be used.
65 # If USE_TTY_GROUP is set to "yes", then wall and write will be installed
66 # setgid to the "tty" group, and mesg will only set the group write bit.
67 # Note that this is only useful if login/xterm/etc. change the group of the
68 # user's tty to "tty" [The login in util-linux does this correctly, and
69 # xterm will do it correctly if X is compiled with USE_TTY_GROUP set
73 # If HAVE_KILL is set to "yes", then kill will not be built or
74 # installed from the misc-utils subdirectory.
75 # (There is also a kill in the procps package.)
78 # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
79 # to the current user, allowing her to make a screendump and do other
80 # nifty things on the console, but also allowing him to keep an open
81 # file descriptor after logging out to trick the next user.
84 # If HAVE_RESET is set to "yes", then reset won't be installed. The version
85 # of reset that comes with the ncurses package is less aggressive.
88 # If HAVE_SLN is set to "yes", then sln won't be installed
89 # (but the man page sln.8 will be installed anyway).
90 # sln also comes with libc and glibc.
93 # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
96 # If SILENT_PG is set to "yes", then pg will not ring the bell
97 # when an invalid key is pressed
100 # If configure decides that Native Language Support (NLS) is available,
101 # it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
102 # DISABLE_NLS to "yes".
105 # Different optimizations for different cpus.
106 # gcc 3.0 likes options -mcpu=i486 instead of -m486
107 ifeq "$(ARCH)" "intel"
108 ifeq "$(HAVE_OLD_GCC)" "yes"
118 CPUOPT= $(CPUHEAD)$(CPUTAIL)
119 OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
122 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
124 OPT= -O2 -fomit-frame-pointer
128 WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
134 # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
135 # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
137 # There is a subdirectory /usr/include/slang containing slcurses.h
138 # SLANGFLAGS=-I/usr/include/slang
139 # No such subdirectory - slcurses.h lives in /usr/include
140 # (no extra definition required).
144 # Paths used for compilation (not all are actually used, see CFLAGS below)
149 USRSBIN_DIR= /usr/sbin
152 USRGAMES_DIR= /usr/games
153 USRSHAREMISC_DIR=/usr/share/misc
154 LOCALE_DIR= /usr/share/locale
158 MAN_DIR= /usr/share/man
159 INFO_DIR= /usr/share/info
162 # Paths used for install
164 DEVDIR= $(DESTDIR)$(DEV_DIR)
165 ETCDIR= $(DESTDIR)$(ETC_DIR)
166 SBINDIR= $(DESTDIR)$(SBIN_DIR)
167 USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
168 USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
169 USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
170 USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
171 USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
172 LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
173 BINDIR= $(DESTDIR)$(BIN_DIR)
174 VARPATH= $(DESTDIR)$(VAR_PATH)
175 LOGDIR= $(DESTDIR)$(LOG_DIR)
176 MANDIR= $(DESTDIR)$(MAN_DIR)
177 MAN1DIR= $(MANDIR)/man1
178 MAN3DIR= $(MANDIR)/man3
179 MAN5DIR= $(MANDIR)/man5
180 MAN6DIR= $(MANDIR)/man6
181 MAN8DIR= $(MANDIR)/man8
182 INFODIR= $(DESTDIR)$(INFO_DIR)
184 # Directory for shutdown, halt, reboot, etc.
185 SHUTDOWNDIR= $(SBINDIR)
197 INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
198 INSTALLBIN= $(INSTALL) -m $(BINMODE)
199 INSTALLMAN= $(INSTALL) -m $(MANMODE)
200 INSTALLDAT= $(INSTALL) -m $(DATMODE)
201 INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
203 ifeq "$(DISABLE_NLS)" "yes"
204 NLSFLAGS = -DDISABLE_NLS
207 CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
208 $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
209 -D_FILE_OFFSET_BITS=64 \
210 -DSBINDIR=\"$(SBIN_DIR)\" \
211 -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
212 -DLOGDIR=\"$(LOG_DIR)\" \
213 -DVARPATH=\"$(VAR_PATH)\" \
214 -DLOCALEDIR=\"$(LOCALE_DIR)\" \
219 $(CC) -c $(CFLAGS) $< -o $@
222 $(CXX) $(CFLAGS) $< -o $@