]> git.ipfire.org Git - thirdparty/util-linux.git/blob - MCONFIG
Imported from util-linux-2.10s 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 # 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/')
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
20
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
23 # subdirectory.
24 HAVE_SHADOW=yes
25
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
30
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
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.)
47 HAVE_SYSVINIT=yes
48
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=yes
54
55 # If HAVE_GETTY is set to "yes", then agetty will not be built or
56 # installed from the login-utils subdirectory. Note that agetty can
57 # co-exist with other gettys, so this option should never be used.
58 HAVE_GETTY=no
59
60 # If USE_TTY_GROUP is set to "yes", then wall and write will be installed
61 # setgid to the "tty" group, and mesg will only set the group write bit.
62 # Note that this is only useful if login/xterm/etc. change the group of the
63 # user's tty to "tty" [The login in util-linux does this correctly, and
64 # xterm will do it correctly if X is compiled with USE_TTY_GROUP set
65 # properly.]
66 USE_TTY_GROUP=yes
67
68 # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
69 # to the current user, allowing her to make a screendump and do other
70 # nifty things on the console, but also allowing him to keep an open
71 # file descriptor after logging out to trick the next user.
72 ALLOW_VCS_USE=yes
73
74 # If HAVE_RESET is set to "yes", then reset won't be installed. The version
75 # of reset that comes with the ncurses package is less aggressive.
76 HAVE_RESET=yes
77
78 # If HAVE_SLN is set to "yes", then sln won't be installed
79 # (but the man page sln.8 will be installed anyway).
80 # sln also comes with libc and glibc.
81 HAVE_SLN=no
82
83 # If HAVE_TSORT is set to "yes", then tsort won't be installed.
84 # GNU textutils 2.0 includes tsort.
85 HAVE_TSORT=no
86
87 # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
88 HAVE_FDUTILS=no
89
90 # Different optimizations for different cpus.
91 ifeq "$(ARCH)" "intel"
92 ifeq "$(CPU)" "i386"
93 OPT= -pipe -O2 -m386 -fomit-frame-pointer
94 else
95 OPT= -pipe -O2 -m486 -fomit-frame-pointer
96 endif
97 else
98 ifeq "$(ARCH)" "arm"
99 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
100 else
101 OPT= -O2 -fomit-frame-pointer
102 endif
103 endif
104
105 WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
106
107 LIB=../lib
108
109 ERR_O=$(LIB)/err.o
110
111 # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
112 # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
113 # HAVE_SLANG=yes
114
115 # There is a subdirectory /usr/include/slang containing slcurses.h
116 # SLANGFLAGS=-I/usr/include/slang
117 # No such subdirectory - slcurses.h lives in /usr/include
118 # (no extra definition required).
119 LIBSLANG=-lslang
120
121 DEVDIR= $(DESTDIR)/dev
122 ETCDIR= $(DESTDIR)/etc
123 SBINDIR= $(DESTDIR)/sbin
124 USRSBINDIR= $(DESTDIR)/usr/sbin
125 USRLIBDIR= $(DESTDIR)/usr/lib
126 USRBINDIR= $(DESTDIR)/usr/bin
127 USRGAMESDIR= $(DESTDIR)/usr/games
128 USRSHAREMISCDIR=$(DESTDIR)/usr/share/misc
129 LOCALEDIR= $(DESTDIR)/usr/share/locale
130 BINDIR= $(DESTDIR)/bin
131 VARPATH= $(DESTDIR)/var
132 LOGDIR= $(DESTDIR)/var/log
133 MANDIR= $(DESTDIR)/usr/man
134 MAN1DIR= $(MANDIR)/man1
135 MAN3DIR= $(MANDIR)/man3
136 MAN5DIR= $(MANDIR)/man5
137 MAN6DIR= $(MANDIR)/man6
138 MAN8DIR= $(MANDIR)/man8
139 INFODIR= $(DESTDIR)/usr/info
140
141 # Directory for shutdown, halt, reboot, etc.
142 SHUTDOWNDIR= $(SBINDIR)
143
144 # Directory for fsck
145 FSCKDIR= $(SBINDIR)
146
147 # Directory for passwd
148 PASSWDDIR= $(USRBINDIR)
149
150 # Directory for help file for more. Used to be /usr/lib.
151 MOREHELPDIR= $(USRSHAREMISCDIR)
152
153 # Modes
154 DIRMODE= 755
155 BINMODE= 755
156 MANMODE= 644
157 DATMODE= 644
158 INFOMODE= 644
159 SUIDMODE= 4755
160
161 CHMOD= chmod
162 INSTALL= install
163 INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
164 INSTALLBIN= $(INSTALL) -m $(BINMODE)
165 INSTALLMAN= $(INSTALL) -m $(MANMODE)
166 INSTALLDAT= $(INSTALL) -m $(DATMODE)
167 INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root
168
169 CFLAGS := $(CFLAGS) $(OPT) -I$(LIB) $(WARNFLAGS) \
170 $(CURSESFLAGS) $(SLANGFLAGS) \
171 -DSBINDIR=\"$(SBINDIR)\" \
172 -DUSRSBINDIR=\"$(USRSBINDIR)\" \
173 -DLOGDIR=\"$(LOGDIR)\" \
174 -DVARPATH=\"$(VARPATH)\" \
175 -DLOCALEDIR=\"$(LOCALEDIR)\"
176
177
178 %.o: %.c
179 $(CC) -c $(CFLAGS) $< -o $@
180
181 %: %.cc
182 $(CXX) $(CFLAGS) $< -o $@
183