]> git.ipfire.org Git - thirdparty/util-linux.git/blob - MCONFIG
Imported from util-linux-2.9i 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 CPU one of intel, alpha, sparc, arm, m68k, mips
11 CPU=$(shell uname -m | sed s/i.86/intel/)
12
13 # if HAVE_LIBCRYPT is "yes" -lcrypt will be used
14 HAVE_LIBCRYPT=yes
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 HAVE_OPENPTY is set to "yes", then script will use the Unix98 ptys
69 HAVE_OPENPTY=no
70
71 # If HAVE_RESET is set to "yes", then reset won't be installed. The version
72 # of reset that comes with the ncurses package is less aggressive.
73 HAVE_RESET=yes
74
75 # If HAVE_SLN is set to "yes", then sln won't be installed
76 # (but the man page sln.8 will be installed anyway).
77 # sln also comes with libc and glibc.
78 HAVE_SLN=no
79
80 CC= gcc
81
82 # Different optimizations for different cpus.
83 ifeq "$(CPU)" "intel"
84 OPT= -pipe -O3 -m486 -fomit-frame-pointer
85 else
86 ifeq "$(CPU)" "arm"
87 OPT= -O2 -m3 -fomit-frame-pointer
88 else
89 OPT= -O3 -fomit-frame-pointer
90 endif
91 endif
92
93 ERR_O=$(LIB)/err.o
94
95 LIB=../lib
96
97 LDFLAGS = -s
98 WARNFLAGS = -Wall
99
100 CFLAGS = $(OPT) -I. -I$(LIB) $(WARNFLAGS) \
101 $(CURSESFLAGS) $(SLANGFLAGS) \
102 $(EXTRACFLAGS) \
103 -DSBINDIR=\"$(SBINDIR)\" \
104 -DUSRSBINDIR=\"$(USRSBINDIR)\" \
105 -DLOGDIR=\"$(LOGDIR)\" \
106 -DVARPATH=\"$(VARPATH)\"
107
108 # Set HAVE_NCURSES to "yes" if you have ncurses
109 # (without it, more, ul and setterm are not made)
110 HAVE_NCURSES=yes
111
112 # ncurses appears to be installed in three major ways.
113 #
114 # There is a subdirectory /usr/include/ncurses, with curses.h in
115 # CURSESFLAGS=-I/usr/include/ncurses -DNCH=0
116 # No such subdirectory, but ncurses/curses.h is installed as ncurses.h
117 # CURSESFLAGS=-DNCH=1
118 # No such subdirectory - <curses.h> is the ncurses one.
119 # CURSESFLAGS=-DNCH=0
120 # Pick your choice.
121 CURSESFLAGS=-I/usr/include/ncurses -DNCH=0
122 LIBCURSES=-lncurses
123
124 # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
125 # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
126 # HAVE_SLANG=yes
127
128 # There is a subdirectory /usr/include/slang containing slcurses.h
129 # SLANGFLAGS=-I/usr/include/slang
130 # No such subdirectory - slcurses.h lives in /usr/include
131 # (no extra definition required).
132 LIBSLANG=-lslang
133
134 DEVDIR= $(DESTDIR)/dev
135 ETCDIR= $(DESTDIR)/etc
136 SBINDIR= $(DESTDIR)/sbin
137 USRSBINDIR= $(DESTDIR)/usr/sbin
138 USRLIBDIR= $(DESTDIR)/usr/lib
139 USRBINDIR= $(DESTDIR)/usr/bin
140 USRGAMESDIR= $(DESTDIR)/usr/games
141 BINDIR= $(DESTDIR)/bin
142 VARPATH= $(DESTDIR)/var
143 LOGDIR= $(DESTDIR)/var/log
144 MANDIR= $(DESTDIR)/usr/man
145 MAN1DIR= $(MANDIR)/man1
146 MAN3DIR= $(MANDIR)/man3
147 MAN5DIR= $(MANDIR)/man5
148 MAN6DIR= $(MANDIR)/man6
149 MAN8DIR= $(MANDIR)/man8
150 INFODIR= $(DESTDIR)/usr/info
151
152 # Directory for shutdown, halt, reboot, etc.
153 SHUTDOWNDIR= $(SBINDIR)
154
155 # Directory for fsck
156 FSCKDIR= $(SBINDIR)
157
158 # Directory for passwd
159 PASSWDDIR= $(USRBINDIR)
160
161 # Modes
162 DIRMODE= 755
163 BINMODE= 755
164 MANMODE= 644
165 DATMODE= 644
166 INFOMODE= 644
167 SUIDMODE= 4755
168
169 CHMOD= chmod
170 INSTALL= install
171 INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
172 INSTALLBIN= $(INSTALL) -m $(BINMODE)
173 INSTALLMAN= $(INSTALL) -m $(MANMODE)
174 INSTALLDAT= $(INSTALL) -m $(DATMODE)
175 INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root
176
177 %.o: %.c
178 $(CC) -c $(CFLAGS) $< -o $@
179
180 %: %.cc
181 $(CXX) $(CFLAGS) $< -o $@
182