]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
1 | # MCONFIG -- Configuration stuff for util-linux |
2 | # Created: Sat Feb 4 15:50:30 1995 | |
6dbe3af9 | 3 | # Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) |
fd6b7a7f | 4 | |
5c36a0eb KZ |
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 | ||
66ee8158 KZ |
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) | |
13 | CPU=$(shell uname -m) | |
14 | ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') | |
fd6b7a7f KZ |
15 | |
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. | |
19 | HAVE_PAM=no | |
fd6b7a7f | 20 | |
726f69e2 KZ |
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 | |
fd6b7a7f | 23 | # subdirectory. |
5c36a0eb | 24 | HAVE_SHADOW=yes |
6dbe3af9 | 25 | |
fd6b7a7f KZ |
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). | |
29 | HAVE_PASSWD=no | |
fd6b7a7f | 30 | |
726f69e2 KZ |
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. | |
33 | REQUIRE_PASSWORD=yes | |
34 | #REQUIRE_PASSWORD=no | |
35 | ||
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 | |
41 | ||
42 | ||
726f69e2 KZ |
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.) | |
fd6b7a7f | 47 | HAVE_SYSVINIT=yes |
6dbe3af9 | 48 | |
726f69e2 KZ |
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.) | |
fd6b7a7f | 53 | HAVE_SYSVINIT_UTILS=yes |
726f69e2 | 54 | |
364cda48 KZ |
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.) | |
58 | HAVE_WRITE=no | |
59 | ||
fd6b7a7f | 60 | # If HAVE_GETTY is set to "yes", then agetty will not be built or |
726f69e2 KZ |
61 | # installed from the login-utils subdirectory. Note that agetty can |
62 | # co-exist with other gettys, so this option should never be used. | |
63 | HAVE_GETTY=no | |
726f69e2 KZ |
64 | |
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 | |
70 | # properly.] | |
71 | USE_TTY_GROUP=yes | |
726f69e2 | 72 | |
ffc43748 KZ |
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.) | |
76 | HAVE_KILL=no | |
77 | ||
66ee8158 KZ |
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. | |
82 | ALLOW_VCS_USE=yes | |
83 | ||
fd6b7a7f KZ |
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. | |
fd6b7a7f KZ |
86 | HAVE_RESET=yes |
87 | ||
5c36a0eb KZ |
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. | |
91 | HAVE_SLN=no | |
726f69e2 | 92 | |
eb63b9b8 KZ |
93 | # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. |
94 | HAVE_FDUTILS=no | |
95 | ||
fd6b7a7f | 96 | # Different optimizations for different cpus. |
e8f26419 | 97 | # gcc 3.0 likes options -mcpu=i486 instead of -m486 |
66ee8158 | 98 | ifeq "$(ARCH)" "intel" |
e8f26419 KZ |
99 | ifeq "$(HAVE_OLD_GCC)" "yes" |
100 | CPUHEAD=-m | |
101 | else | |
102 | CPUHEAD=-mcpu=i | |
103 | endif | |
66ee8158 | 104 | ifeq "$(CPU)" "i386" |
e8f26419 | 105 | CPUTAIL=386 |
66ee8158 | 106 | else |
e8f26419 | 107 | CPUTAIL=486 |
66ee8158 | 108 | endif |
e8f26419 KZ |
109 | CPUOPT= $(CPUHEAD)$(CPUTAIL) |
110 | OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer | |
fd6b7a7f | 111 | else |
66ee8158 | 112 | ifeq "$(ARCH)" "arm" |
eb63b9b8 | 113 | OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer |
fd6b7a7f | 114 | else |
7eda085c | 115 | OPT= -O2 -fomit-frame-pointer |
fd6b7a7f KZ |
116 | endif |
117 | endif | |
118 | ||
22853e4a | 119 | WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes |
5c36a0eb KZ |
120 | |
121 | LIB=../lib | |
fd6b7a7f | 122 | |
eb63b9b8 | 123 | ERR_O=$(LIB)/err.o |
5c36a0eb | 124 | |
2b6fc908 KZ |
125 | # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk) |
126 | # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.) | |
127 | # HAVE_SLANG=yes | |
128 | ||
129 | # There is a subdirectory /usr/include/slang containing slcurses.h | |
130 | # SLANGFLAGS=-I/usr/include/slang | |
131 | # No such subdirectory - slcurses.h lives in /usr/include | |
132 | # (no extra definition required). | |
133 | LIBSLANG=-lslang | |
134 | ||
364cda48 KZ |
135 | # |
136 | # Paths used for compilation (not all are actually used, see CFLAGS below) | |
137 | # | |
138 | DEV_DIR= /dev | |
139 | ETC_DIR= /etc | |
140 | SBIN_DIR= /sbin | |
141 | USRSBIN_DIR= /usr/sbin | |
142 | USRLIB_DIR= /usr/lib | |
143 | USRBIN_DIR= /usr/bin | |
144 | USRGAMES_DIR= /usr/games | |
145 | USRSHAREMISC_DIR=/usr/share/misc | |
146 | LOCALE_DIR= /usr/share/locale | |
147 | BIN_DIR= /bin | |
148 | VAR_PATH= /var | |
149 | LOG_DIR= /var/log | |
150 | MAN_DIR= /usr/share/man | |
151 | INFO_DIR= /usr/share/info | |
152 | ||
153 | # Directory for help file for more. Used to be /usr/lib. | |
154 | MOREHELP_DIR= $(USRSHAREMISC_DIR) | |
155 | ||
156 | # | |
157 | # Paths used for install | |
158 | # | |
159 | DEVDIR= $(DESTDIR)$(DEV_DIR) | |
160 | ETCDIR= $(DESTDIR)$(ETC_DIR) | |
161 | SBINDIR= $(DESTDIR)$(SBIN_DIR) | |
162 | USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR) | |
163 | USRLIBDIR= $(DESTDIR)$(USRLIB_DIR) | |
164 | USRBINDIR= $(DESTDIR)$(USRBIN_DIR) | |
165 | USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR) | |
166 | USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR) | |
167 | LOCALEDIR= $(DESTDIR)$(LOCALE_DIR) | |
168 | BINDIR= $(DESTDIR)$(BIN_DIR) | |
169 | VARPATH= $(DESTDIR)$(VAR_PATH) | |
170 | LOGDIR= $(DESTDIR)$(LOG_DIR) | |
171 | MANDIR= $(DESTDIR)$(MAN_DIR) | |
5c36a0eb KZ |
172 | MAN1DIR= $(MANDIR)/man1 |
173 | MAN3DIR= $(MANDIR)/man3 | |
174 | MAN5DIR= $(MANDIR)/man5 | |
175 | MAN6DIR= $(MANDIR)/man6 | |
176 | MAN8DIR= $(MANDIR)/man8 | |
364cda48 | 177 | INFODIR= $(DESTDIR)$(INFO_DIR) |
6dbe3af9 KZ |
178 | |
179 | # Directory for shutdown, halt, reboot, etc. | |
180 | SHUTDOWNDIR= $(SBINDIR) | |
181 | ||
66ee8158 | 182 | # Directory for help file for more. Used to be /usr/lib. |
364cda48 | 183 | MOREHELPDIR= $(DESTDIR)$(MOREHELP_DIR) |
eb63b9b8 | 184 | |
6dbe3af9 KZ |
185 | # Modes |
186 | DIRMODE= 755 | |
187 | BINMODE= 755 | |
188 | MANMODE= 644 | |
189 | DATMODE= 644 | |
190 | INFOMODE= 644 | |
5c36a0eb | 191 | SUIDMODE= 4755 |
6dbe3af9 KZ |
192 | |
193 | CHMOD= chmod | |
194 | INSTALL= install | |
195 | INSTALLDIR= $(INSTALL) -d -m $(DIRMODE) | |
196 | INSTALLBIN= $(INSTALL) -m $(BINMODE) | |
197 | INSTALLMAN= $(INSTALL) -m $(MANMODE) | |
198 | INSTALLDAT= $(INSTALL) -m $(DATMODE) | |
199 | INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root | |
200 | ||
66ee8158 KZ |
201 | CFLAGS := $(CFLAGS) $(OPT) -I$(LIB) $(WARNFLAGS) \ |
202 | $(CURSESFLAGS) $(SLANGFLAGS) \ | |
c07ebfa1 | 203 | -D_FILE_OFFSET_BITS=64 \ |
364cda48 KZ |
204 | -DSBINDIR=\"$(SBIN_DIR)\" \ |
205 | -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \ | |
206 | -DLOGDIR=\"$(LOG_DIR)\" \ | |
207 | -DVARPATH=\"$(VAR_PATH)\" \ | |
208 | -DLOCALEDIR=\"$(LOCALE_DIR)\" | |
66ee8158 KZ |
209 | |
210 | ||
726f69e2 KZ |
211 | %.o: %.c |
212 | $(CC) -c $(CFLAGS) $< -o $@ | |
213 | ||
214 | %: %.cc | |
215 | $(CXX) $(CFLAGS) $< -o $@ | |
fd6b7a7f | 216 |