]> git.ipfire.org Git - thirdparty/util-linux.git/blame - MCONFIG
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / MCONFIG
CommitLineData
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)
13CPU=$(shell uname -m)
14ARCH=$(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.
19HAVE_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 24HAVE_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).
29HAVE_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.
33REQUIRE_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.
39ONLY_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 47HAVE_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 53HAVE_SYSVINIT_UTILS=yes
726f69e2 54
fd6b7a7f 55# If HAVE_GETTY is set to "yes", then agetty will not be built or
726f69e2
KZ
56# installed from the login-utils subdirectory. Note that agetty can
57# co-exist with other gettys, so this option should never be used.
58HAVE_GETTY=no
726f69e2
KZ
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.]
66USE_TTY_GROUP=yes
726f69e2 67
66ee8158
KZ
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.
72ALLOW_VCS_USE=yes
73
fd6b7a7f
KZ
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.
fd6b7a7f
KZ
76HAVE_RESET=yes
77
5c36a0eb
KZ
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.
81HAVE_SLN=no
726f69e2 82
eb63b9b8
KZ
83# If HAVE_TSORT is set to "yes", then tsort won't be installed.
84# GNU textutils 2.0 includes tsort.
85HAVE_TSORT=no
86
87# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
88HAVE_FDUTILS=no
89
fd6b7a7f 90# Different optimizations for different cpus.
66ee8158
KZ
91ifeq "$(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
fd6b7a7f 97else
66ee8158 98 ifeq "$(ARCH)" "arm"
eb63b9b8 99 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
fd6b7a7f 100 else
7eda085c 101 OPT= -O2 -fomit-frame-pointer
fd6b7a7f
KZ
102 endif
103endif
104
22853e4a 105WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
5c36a0eb
KZ
106
107LIB=../lib
fd6b7a7f 108
eb63b9b8 109ERR_O=$(LIB)/err.o
5c36a0eb 110
2b6fc908
KZ
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).
119LIBSLANG=-lslang
120
6dbe3af9
KZ
121DEVDIR= $(DESTDIR)/dev
122ETCDIR= $(DESTDIR)/etc
123SBINDIR= $(DESTDIR)/sbin
124USRSBINDIR= $(DESTDIR)/usr/sbin
726f69e2 125USRLIBDIR= $(DESTDIR)/usr/lib
6dbe3af9
KZ
126USRBINDIR= $(DESTDIR)/usr/bin
127USRGAMESDIR= $(DESTDIR)/usr/games
66ee8158
KZ
128USRSHAREMISCDIR=$(DESTDIR)/usr/share/misc
129LOCALEDIR= $(DESTDIR)/usr/share/locale
6dbe3af9
KZ
130BINDIR= $(DESTDIR)/bin
131VARPATH= $(DESTDIR)/var
726f69e2 132LOGDIR= $(DESTDIR)/var/log
6dbe3af9 133MANDIR= $(DESTDIR)/usr/man
5c36a0eb
KZ
134MAN1DIR= $(MANDIR)/man1
135MAN3DIR= $(MANDIR)/man3
136MAN5DIR= $(MANDIR)/man5
137MAN6DIR= $(MANDIR)/man6
138MAN8DIR= $(MANDIR)/man8
6dbe3af9
KZ
139INFODIR= $(DESTDIR)/usr/info
140
141# Directory for shutdown, halt, reboot, etc.
142SHUTDOWNDIR= $(SBINDIR)
143
144# Directory for fsck
145FSCKDIR= $(SBINDIR)
146
6dbe3af9
KZ
147# Directory for passwd
148PASSWDDIR= $(USRBINDIR)
149
66ee8158
KZ
150# Directory for help file for more. Used to be /usr/lib.
151MOREHELPDIR= $(USRSHAREMISCDIR)
eb63b9b8 152
6dbe3af9
KZ
153# Modes
154DIRMODE= 755
155BINMODE= 755
156MANMODE= 644
157DATMODE= 644
158INFOMODE= 644
5c36a0eb 159SUIDMODE= 4755
6dbe3af9
KZ
160
161CHMOD= chmod
162INSTALL= install
163INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
164INSTALLBIN= $(INSTALL) -m $(BINMODE)
165INSTALLMAN= $(INSTALL) -m $(MANMODE)
166INSTALLDAT= $(INSTALL) -m $(DATMODE)
167INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root
168
66ee8158
KZ
169CFLAGS := $(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
726f69e2
KZ
178%.o: %.c
179 $(CC) -c $(CFLAGS) $< -o $@
180
181%: %.cc
182 $(CXX) $(CFLAGS) $< -o $@
fd6b7a7f 183