]> git.ipfire.org Git - thirdparty/util-linux.git/blob - MCONFIG
Imported from util-linux-2.12j tarball.
[thirdparty/util-linux.git] / MCONFIG
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)
4
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
8 # - define DESTDIR
9
10 ## Configuration outside of this file you might want to do for mount:
11 ## If make_include has HAVE_BLKID=yes, turn that into HAVE_BLKID=no
12 ## if you do not want to use the blkid library.
13 ## In mount/realpath.c turn #define resolve_symlinks into
14 ## #undef resolve_symlinks if you use devfs and hate long names.
15
16 # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
17 # Select for CPU i386 if the binaries must be able to run on an intel 386
18 # (by default i486 code is generated, see below)
19 CPU=$(shell uname -m)
20 ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
21
22 # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
23 # will use PAM for authentication. Additionally, passwd will not be
24 # installed as it is not PAM aware.
25 HAVE_PAM=no
26
27 # If HAVE_SELINUX is set to "yes", the login will make sure the user is
28 # logged into an appropriate security context
29 HAVE_SELINUX=no
30
31 # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
32 # and vipw will not be built or installed from the login-utils
33 # subdirectory.
34 HAVE_SHADOW=yes
35
36 # If HAVE_PASSWD is set to "yes", then passwd will not be built or
37 # installed from the login-utils subdirectory.
38 HAVE_PASSWD=no
39
40 # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
41 # non-root users to enter the account password before updating /etc/passwd.
42 REQUIRE_PASSWORD=yes
43 #REQUIRE_PASSWORD=no
44
45 # If you use chsh from this package, ONLY_LISTED_SHELLS will require that
46 # the selected shell be listed in /etc/shells -- otherwise only a warning is
47 # printed. This prevents someone from setting their shell to /bin/false.
48 ONLY_LISTED_SHELLS=yes
49 #ONLY_LISTED_SHELLS=no
50
51
52 # If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
53 # be built or installed from the login-utils subdirectory. (The shutdown
54 # and halt that come with the SysVinit package should be used with the init
55 # found in that package.)
56 HAVE_SYSVINIT=yes
57
58 # If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
59 # not be built or installed from the login-utils subdirectory. (The
60 # shutdown and init from the SysVinit package do not depend on the last,
61 # mesg, and wall from that package.)
62 HAVE_SYSVINIT_UTILS=yes
63
64 # If HAVE_WRITE is set to "yes", then write will not be built or
65 # installed from the misc-utils subdirectory.
66 # (There is a network aware write in netwrite from NetKit 0.16 or later.)
67 HAVE_WRITE=no
68
69 # If HAVE_GETTY is set to "yes", then agetty will not be built or
70 # installed from the login-utils subdirectory. Note that agetty can
71 # co-exist with other gettys, so this option should never be used.
72 HAVE_GETTY=no
73
74 # If USE_TTY_GROUP is set to "yes", then wall and write will be installed
75 # setgid to the "tty" group, and mesg will only set the group write bit.
76 # Note that this is only useful if login/xterm/etc. change the group of the
77 # user's tty to "tty" [The login in util-linux does this correctly, and
78 # xterm will do it correctly if X is compiled with USE_TTY_GROUP set
79 # properly.]
80 USE_TTY_GROUP=yes
81
82 # If HAVE_KILL is set to "yes", then kill will not be built or
83 # installed from the misc-utils subdirectory.
84 # (There is also a kill in the procps package.)
85 HAVE_KILL=no
86
87 # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
88 # to the current user, allowing her to make a screendump and do other
89 # nifty things on the console, but also allowing him to keep an open
90 # file descriptor after logging out to trick the next user.
91 ALLOW_VCS_USE=yes
92
93 # If DO_STAT_MAIL is set to "yes", then login will stat() the mailbox
94 # and tell the user that she has new mail. This can hang the login if
95 # the mailbox is on a NFS mounted filesystem.
96 DO_STAT_MAIL=no
97
98 # If HAVE_RESET is set to "yes", then reset won't be installed. The version
99 # of reset that comes with the ncurses package is less aggressive.
100 HAVE_RESET=yes
101
102 # If HAVE_SLN is set to "yes", then sln won't be installed
103 # (but the man page sln.8 will be installed anyway).
104 # sln also comes with libc and glibc.
105 HAVE_SLN=no
106
107 # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
108 HAVE_FDUTILS=no
109
110 # If SILENT_PG is set to "yes", then pg will not ring the bell
111 # when an invalid key is pressed
112 SILENT_PG=no
113
114 # If configure decides that Native Language Support (NLS) is available,
115 # it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
116 # DISABLE_NLS to "yes".
117 DISABLE_NLS=no
118
119 # Different optimizations for different cpus.
120 # gcc 3.0 likes options -mcpu=i486 instead of -m486
121 ifeq "$(ARCH)" "intel"
122 ifeq "$(HAVE_OLD_GCC)" "yes"
123 CPUHEAD=-m
124 else
125 CPUHEAD=-mcpu=i
126 # it is rumoured that recent gcc versions want -march=i
127 # must add the right test
128 endif
129 ifeq "$(CPU)" "i386"
130 CPUTAIL=386
131 else
132 CPUTAIL=486
133 endif
134 CPUOPT= $(CPUHEAD)$(CPUTAIL)
135 OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
136 else
137 ifeq "$(ARCH)" "arm"
138 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
139 else
140 OPT= -O2 -fomit-frame-pointer
141 endif
142 endif
143
144 WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
145
146 LIB=../lib
147
148 ERR_O=$(LIB)/err.o
149
150 # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
151 # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
152 # HAVE_SLANG=yes
153 # There is a subdirectory /usr/include/slang containing slcurses.h
154 # SLANGFLAGS=-I/usr/include/slang
155 # No such subdirectory - slcurses.h lives in /usr/include
156 # (no extra definition required).
157 LIBSLANG=-lslang
158
159 #
160 # Paths used for compilation (not all are actually used, see CFLAGS below)
161 #
162 DEV_DIR= /dev
163 ETC_DIR= /etc
164 SBIN_DIR= /sbin
165 USRSBIN_DIR= /usr/sbin
166 USRLIB_DIR= /usr/lib
167 USRBIN_DIR= /usr/bin
168 USRGAMES_DIR= /usr/games
169 USRSHAREMISC_DIR=/usr/share/misc
170 LOCALE_DIR= /usr/share/locale
171 BIN_DIR= /bin
172 VAR_PATH= /var
173 LOG_DIR= /var/log
174 MAN_DIR= /usr/share/man
175 INFO_DIR= /usr/share/info
176
177 #
178 # Paths used for install
179 #
180 DEVDIR= $(DESTDIR)$(DEV_DIR)
181 ETCDIR= $(DESTDIR)$(ETC_DIR)
182 SBINDIR= $(DESTDIR)$(SBIN_DIR)
183 USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
184 USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
185 USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
186 USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
187 USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
188 LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
189 BINDIR= $(DESTDIR)$(BIN_DIR)
190 VARPATH= $(DESTDIR)$(VAR_PATH)
191 LOGDIR= $(DESTDIR)$(LOG_DIR)
192 MANDIR= $(DESTDIR)$(MAN_DIR)
193 MAN1DIR= $(MANDIR)/man1
194 MAN3DIR= $(MANDIR)/man3
195 MAN5DIR= $(MANDIR)/man5
196 MAN6DIR= $(MANDIR)/man6
197 MAN8DIR= $(MANDIR)/man8
198 INFODIR= $(DESTDIR)$(INFO_DIR)
199
200 # Directory for shutdown, halt, reboot, etc.
201 SHUTDOWNDIR= $(SBINDIR)
202
203 # Modes
204 DIRMODE= 755
205 BINMODE= 755
206 MANMODE= 644
207 DATMODE= 644
208 INFOMODE= 644
209 SUIDMODE= 4755
210
211 CHMOD= chmod
212 INSTALL= install
213 INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
214 INSTALLBIN= $(INSTALL) -m $(BINMODE)
215 INSTALLMAN= $(INSTALL) -m $(MANMODE)
216 INSTALLDAT= $(INSTALL) -m $(DATMODE)
217 INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root
218
219 ifeq "$(DISABLE_NLS)" "yes"
220 NLSFLAGS = -DDISABLE_NLS
221 endif
222
223 CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
224 $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
225 -D_FILE_OFFSET_BITS=64 \
226 -DSBINDIR=\"$(SBIN_DIR)\" \
227 -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
228 -DLOGDIR=\"$(LOG_DIR)\" \
229 -DVARPATH=\"$(VAR_PATH)\" \
230 -DLOCALEDIR=\"$(LOCALE_DIR)\" \
231 $(CFLAGS)
232
233
234 %.o: %.c
235 $(CC) -c $(CFLAGS) $< -o $@
236
237 %: %.cc
238 $(CXX) $(CFLAGS) $< -o $@
239