build system cleanup: rename FEATURE_AWK_MATH to FEATURE_AWK_LIBM;
[oweals/busybox.git] / Config.in
1 #
2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
4 #
5
6 mainmenu "BusyBox Configuration"
7
8 config HAVE_DOT_CONFIG
9         bool
10         default y
11
12 menu "Busybox Settings"
13
14 menu "General Configuration"
15
16 config DESKTOP
17         bool "Enable options for full-blown desktop systems"
18         default n
19         help
20           Enable options and features which are not essential.
21           Select this only if you plan to use busybox on full-blown
22           desktop machine with common Linux distro, not on an embedded box.
23
24 config EXTRA_COMPAT
25         bool "Provide compatible behavior for rare corner cases (bigger code)"
26         default n
27         help
28           This option makes grep, sed etc handle rare corner cases
29           (embedded NUL bytes and such). This makes code bigger and uses
30           some GNU extensions in libc. You probably only need this option
31           if you plan to run busybox on desktop.
32
33 config FEATURE_ASSUME_UNICODE
34         bool "Assume that 1:1 char/glyph correspondence is not true"
35         default n
36         help
37           This makes various applets aware that one byte is not
38           one character on screen.
39
40           Busybox aims to eventually work correctly with Unicode displays.
41           Any older encodings are not guaranteed to work.
42           Probably by the time when busybox will be fully Unicode-clean,
43           other encodings will be mainly of historic interest.
44
45 choice
46         prompt "Buffer allocation policy"
47         default FEATURE_BUFFERS_USE_MALLOC
48         help
49           There are 3 ways BusyBox can handle buffer allocations:
50           - Use malloc. This costs code size for the call to xmalloc.
51           - Put them on stack. For some very small machines with limited stack
52             space, this can be deadly. For most folks, this works just fine.
53           - Put them in BSS. This works beautifully for computers with a real
54             MMU (and OS support), but wastes runtime RAM for uCLinux. This
55             behavior was the only one available for BusyBox versions 0.48 and
56             earlier.
57
58 config FEATURE_BUFFERS_USE_MALLOC
59         bool "Allocate with Malloc"
60
61 config FEATURE_BUFFERS_GO_ON_STACK
62         bool "Allocate on the Stack"
63
64 config FEATURE_BUFFERS_GO_IN_BSS
65         bool "Allocate in the .bss section"
66
67 endchoice
68
69 config SHOW_USAGE
70         bool "Show terse applet usage messages"
71         default y
72         help
73           All BusyBox applets will show help messages when invoked with
74           wrong arguments. You can turn off printing these terse usage
75           messages if you say no here.
76           This will save you up to 7k.
77
78 config FEATURE_VERBOSE_USAGE
79         bool "Show verbose applet usage messages"
80         default n
81         select SHOW_USAGE
82         help
83           All BusyBox applets will show more verbose help messages when
84           busybox is invoked with --help. This will add a lot of text to the
85           busybox binary. In the default configuration, this will add about
86           13k, but it can add much more depending on your configuration.
87
88 config FEATURE_COMPRESS_USAGE
89         bool "Store applet usage messages in compressed form"
90         default y
91         depends on SHOW_USAGE
92         help
93           Store usage messages in compressed form, uncompress them on-the-fly
94           when <applet> --help is called.
95
96           If you have a really tiny busybox with few applets enabled (and
97           bunzip2 isn't one of them), the overhead of the decompressor might
98           be noticeable. Also, if you run executables directly from ROM
99           and have very little memory, this might not be a win. Otherwise,
100           you probably want this.
101
102 config FEATURE_INSTALLER
103         bool "Support --install [-s] to install applet links at runtime"
104         default n
105         help
106           Enable 'busybox --install [-s]' support. This will allow you to use
107           busybox at runtime to create hard links or symlinks for all the
108           applets that are compiled into busybox.
109
110 config LOCALE_SUPPORT
111         bool "Enable locale support (system needs locale for this to work)"
112         default n
113         help
114           Enable this if your system has locale support and you would like
115           busybox to support locale settings.
116
117 config GETOPT_LONG
118         bool "Support for --long-options"
119         default y
120         help
121           Enable this if you want busybox applets to use the gnu --long-option
122           style, in addition to single character -a -b -c style options.
123
124 config FEATURE_DEVPTS
125         bool "Use the devpts filesystem for Unix98 PTYs"
126         default y
127         help
128           Enable if you want BusyBox to use Unix98 PTY support. If enabled,
129           busybox will use /dev/ptmx for the master side of the pseudoterminal
130           and /dev/pts/<number> for the slave side. Otherwise, BSD style
131           /dev/ttyp<number> will be used. To use this option, you should have
132           devpts mounted.
133
134 config FEATURE_CLEAN_UP
135         bool "Clean up all memory before exiting (usually not needed)"
136         default n
137         help
138           As a size optimization, busybox normally exits without explicitly
139           freeing dynamically allocated memory or closing files. This saves
140           space since the OS will clean up for us, but it can confuse debuggers
141           like valgrind, which report tons of memory and resource leaks.
142
143           Don't enable this unless you have a really good reason to clean
144           things up manually.
145
146 config FEATURE_PIDFILE
147         bool "Support writing pidfiles"
148         default n
149         help
150           This option makes some applets (e.g. crond, syslogd, inetd) write
151           a pidfile in /var/run. Some applications rely on them.
152
153 config FEATURE_SUID
154         bool "Support for SUID/SGID handling"
155         default n
156         help
157           With this option you can install the busybox binary belonging
158           to root with the suid bit set, and it'll and it'll automatically drop
159           priviledges for applets that don't need root access.
160
161           If you're really paranoid and don't want to do this, build two
162           busybox binaries with different applets in them (and the appropriate
163           symlinks pointing to each binary), and only set the suid bit on the
164           one that needs it. The applets currently marked to need the suid bit
165           are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs,
166           and vlock.
167
168 config FEATURE_SUID_CONFIG
169         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
170         default n if FEATURE_SUID
171         depends on FEATURE_SUID
172         help
173           Allow the SUID / SGID state of an applet to be determined at runtime
174           by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
175           The format of this file is as follows:
176
177           <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>)
178
179           An example might help:
180
181           [SUID]
182           su = ssx root.0 # applet su can be run by anyone and runs with
183                           # euid=0/egid=0
184           su = ssx        # exactly the same
185
186           mount = sx- root.disk # applet mount can be run by root and members
187                                 # of group disk and runs with euid=0
188
189           cp = --- # disable applet cp for everyone
190
191           The file has to be owned by user root, group root and has to be
192           writeable only by root:
193                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
194           The busybox executable has to be owned by user root, group
195           root and has to be setuid root for this to work:
196                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
197
198           Robert 'sandman' Griebl has more information here:
199           <url: http://www.softforge.de/bb/suid.html >.
200
201 config FEATURE_SUID_CONFIG_QUIET
202         bool "Suppress warning message if /etc/busybox.conf is not readable"
203         default y
204         depends on FEATURE_SUID_CONFIG
205         help
206           /etc/busybox.conf should be readable by the user needing the SUID,
207           check this option to avoid users to be notified about missing
208           permissions.
209
210 config SELINUX
211         bool "Support NSA Security Enhanced Linux"
212         default n
213         help
214           Enable support for SELinux in applets ls, ps, and id. Also provide
215           the option of compiling in SELinux applets.
216
217           If you do not have a complete SELinux userland installed, this stuff
218           will not compile. Go visit
219                 http://www.nsa.gov/selinux/index.html
220           to download the necessary stuff to allow busybox to compile with
221           this option enabled. Specifially, libselinux 1.28 or better is
222           directly required by busybox. If the installation is located in a
223           non-standard directory, provide it by invoking make as follows:
224                 CFLAGS=-I<libselinux-include-path> \
225                 LDFLAGS=-L<libselinux-lib-path> \
226                 make
227
228           Most people will leave this set to 'N'.
229
230 config FEATURE_PREFER_APPLETS
231         bool "exec prefers applets"
232         default n
233         help
234           This is an experimental option which directs applets about to
235           call 'exec' to try and find an applicable busybox applet before
236           searching the PATH. This is typically done by exec'ing
237           /proc/self/exe.
238           This may affect shell, find -exec, xargs and similar applets.
239           They will use applets even if /bin/<applet> -> busybox link
240           is missing (or is not a link to busybox). However, this causes
241           problems in chroot jails without mounted /proc and with ps/top
242           (command name can be shown as 'exe' for applets started this way).
243
244 config BUSYBOX_EXEC_PATH
245         string "Path to BusyBox executable"
246         default "/proc/self/exe"
247         help
248           When Busybox applets need to run other busybox applets, BusyBox
249           sometimes needs to exec() itself. When the /proc filesystem is
250           mounted, /proc/self/exe always points to the currently running
251           executable. If you haven't got /proc, set this to wherever you
252           want to run BusyBox from.
253
254 # These are auto-selected by other options
255
256 config FEATURE_SYSLOG
257         bool "Support for logging to syslog"
258         default n
259         help
260           This option is auto-selected when you select any applet which may
261           send its output to syslog. You do not need to select it manually.
262
263 config FEATURE_HAVE_RPC
264         bool "RPC support"
265         default n
266         help
267           This is automatically selected if any of enabled applets need it.
268           You do not need to select it manually.
269
270 endmenu
271
272 menu 'Build Options'
273
274 config STATIC
275         bool "Build BusyBox as a static binary (no shared libs)"
276         default n
277         help
278           If you want to build a static BusyBox binary, which does not
279           use or require any shared libraries, then enable this option.
280           This can cause BusyBox to be considerably larger, so you should
281           leave this option false unless you have a good reason (i.e.
282           your target platform does not support shared libraries, or
283           you are building an initrd which doesn't need anything but
284           BusyBox, etc).
285
286           Most people will leave this set to 'N'.
287
288 config PIE
289         bool "Build BusyBox as a position independent executable"
290         default n
291         depends on !STATIC
292         help
293           (TODO: what is it and why/when is it useful?)
294           Most people will leave this set to 'N'.
295
296 config NOMMU
297         bool "Force NOMMU build"
298         default n
299         help
300           Busybox tries to detect whether architecture it is being
301           built against supports MMU or not. If this detection fails,
302           or if you want to build NOMMU version of busybox for testing,
303           you may force NOMMU build here.
304
305           Most people will leave this set to 'N'.
306
307 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
308 # build system does not support that
309 config BUILD_LIBBUSYBOX
310         bool "Build shared libbusybox"
311         default n
312         depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
313         help
314           Build a shared library libbusybox.so.N.N.N which contains all
315           busybox code.
316
317           This feature allows every applet to be built as a tiny
318           separate executable. Enabling it for "one big busybox binary"
319           approach serves no purpose and increases code size.
320           You should almost certainly say "no" to this.
321
322 ### config FEATURE_FULL_LIBBUSYBOX
323 ###     bool "Feature-complete libbusybox"
324 ###     default n if !FEATURE_SHARED_BUSYBOX
325 ###     depends on BUILD_LIBBUSYBOX
326 ###     help
327 ###       Build a libbusybox with the complete feature-set, disregarding
328 ###       the actually selected config.
329 ###
330 ###       Normally, libbusybox will only contain the features which are
331 ###       used by busybox itself. If you plan to write a separate
332 ###       standalone application which uses libbusybox say 'Y'.
333 ###
334 ###       Note: libbusybox is GPL, not LGPL, and exports no stable API that
335 ###       might act as a copyright barrier. We can and will modify the
336 ###       exported function set between releases (even minor version number
337 ###       changes), and happily break out-of-tree features.
338 ###
339 ###       Say 'N' if in doubt.
340
341 config FEATURE_INDIVIDUAL
342         bool "Produce a binary for each applet, linked against libbusybox"
343         default y
344         depends on BUILD_LIBBUSYBOX
345         help
346           If your CPU architecture doesn't allow for sharing text/rodata
347           sections of running binaries, but allows for runtime dynamic
348           libraries, this option will allow you to reduce memory footprint
349           when you have many different applets running at once.
350
351           If your CPU architecture allows for sharing text/rodata,
352           having single binary is more optimal.
353
354           Each applet will be a tiny program, dynamically linked
355           against libbusybox.so.N.N.N.
356
357           You need to have a working dynamic linker.
358
359 config FEATURE_SHARED_BUSYBOX
360         bool "Produce additional busybox binary linked against libbusybox"
361         default y
362         depends on BUILD_LIBBUSYBOX
363         help
364           Build busybox, dynamically linked against libbusybox.so.N.N.N.
365
366           You need to have a working dynamic linker.
367
368 ### config BUILD_AT_ONCE
369 ###     bool "Compile all sources at once"
370 ###     default n
371 ###     help
372 ###       Normally each source-file is compiled with one invocation of
373 ###       the compiler.
374 ###       If you set this option, all sources are compiled at once.
375 ###       This gives the compiler more opportunities to optimize which can
376 ###       result in smaller and/or faster binaries.
377 ###
378 ###       Setting this option will consume alot of memory, e.g. if you
379 ###       enable all applets with all features, gcc uses more than 300MB
380 ###       RAM during compilation of busybox.
381 ###
382 ###       This option is most likely only beneficial for newer compilers
383 ###       such as gcc-4.1 and above.
384 ###
385 ###       Say 'N' unless you know what you are doing.
386
387 config LFS
388         bool "Build with Large File Support (for accessing files > 2 GB)"
389         default n
390         select FDISK_SUPPORT_LARGE_DISKS
391         help
392           If you want to build BusyBox with large file support, then enable
393           this option. This will have no effect if your kernel or your C
394           library lacks large file support for large files. Some of the
395           programs that can benefit from large file support include dd, gzip,
396           cp, mount, tar, and many others. If you want to access files larger
397           than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
398
399 config CROSS_COMPILER_PREFIX
400         string "Cross Compiler prefix"
401         default ""
402         help
403           If you want to build BusyBox with a cross compiler, then you
404           will need to set this to the cross-compiler prefix, for example,
405           "i386-uclibc-".
406
407           Note that CROSS_COMPILE environment variable or
408           "make CROSS_COMPILE=xxx ..." will override this selection.
409
410           Native builds leave this empty.
411
412 endmenu
413
414 menu 'Debugging Options'
415
416 config DEBUG
417         bool "Build BusyBox with extra Debugging symbols"
418         default n
419         help
420           Say Y here if you wish to examine BusyBox internals while applets are
421           running. This increases the size of the binary considerably, and
422           should only be used when doing development. If you are doing
423           development and want to debug BusyBox, answer Y.
424
425           Most people should answer N.
426
427 config DEBUG_PESSIMIZE
428         bool "Disable compiler optimizations"
429         default n
430         depends on DEBUG
431         help
432           The compiler's optimization of source code can eliminate and reorder
433           code, resulting in an executable that's hard to understand when
434           stepping through it with a debugger. This switches it off, resulting
435           in a much bigger executable that more closely matches the source
436           code.
437
438 config WERROR
439         bool "Abort compilation on any warning"
440         default n
441         help
442           Selecting this will add -Werror to gcc command line.
443
444           Most people should answer N.
445
446 choice
447         prompt "Additional debugging library"
448         default NO_DEBUG_LIB
449         help
450           Using an additional debugging library will make BusyBox become
451           considerable larger and will cause it to run more slowly. You
452           should always leave this option disabled for production use.
453
454           dmalloc support:
455           ----------------
456           This enables compiling with dmalloc ( http://dmalloc.com/ )
457           which is an excellent public domain mem leak and malloc problem
458           detector. To enable dmalloc, before running busybox you will
459           want to properly set your environment, for example:
460             export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
461           The 'debug=' value is generated using the following command
462             dmalloc -p log-stats -p log-non-free -p log-bad-space \
463                -p log-elapsed-time -p check-fence -p check-heap \
464                -p check-lists -p check-blank -p check-funcs -p realloc-copy \
465                -p allow-free-null
466
467           Electric-fence support:
468           -----------------------
469           This enables compiling with Electric-fence support. Electric
470           fence is another very useful malloc debugging library which uses
471           your computer's virtual memory hardware to detect illegal memory
472           accesses. This support will make BusyBox be considerable larger
473           and run slower, so you should leave this option disabled unless
474           you are hunting a hard to find memory problem.
475
476
477 config NO_DEBUG_LIB
478         bool "None"
479
480 config DMALLOC
481         bool "Dmalloc"
482
483 config EFENCE
484         bool "Electric-fence"
485
486 endchoice
487
488 config INCLUDE_SUSv2
489         bool "Enable obsolete features removed before SUSv3?"
490         default y
491         help
492           This option will enable backwards compatibility with SuSv2,
493           specifically, old-style numeric options ('command -1 <file>')
494           will be supported in head, tail, and fold. (Note: should
495           affect renice too.)
496
497 ### config PARSE
498 ###     bool "Uniform config file parser debugging applet: parse"
499
500 endmenu
501
502 menu 'Installation Options'
503
504 config INSTALL_NO_USR
505         bool "Don't use /usr"
506         default n
507         help
508           Disable use of /usr. Don't activate this option if you don't know
509           that you really want this behaviour.
510
511 choice
512         prompt "Applets links"
513         default INSTALL_APPLET_SYMLINKS
514         help
515           Choose how you install applets links.
516
517 config INSTALL_APPLET_SYMLINKS
518         bool "as soft-links"
519         help
520           Install applets as soft-links to the busybox binary. This needs some
521           free inodes on the filesystem, but might help with filesystem
522           generators that can't cope with hard-links.
523
524 config INSTALL_APPLET_HARDLINKS
525         bool "as hard-links"
526         help
527           Install applets as hard-links to the busybox binary. This might
528           count on a filesystem with few inodes.
529
530 config INSTALL_APPLET_SCRIPT_WRAPPERS
531         bool "as script wrappers"
532         help
533           Install applets as script wrappers that call the busybox binary.
534
535 config INSTALL_APPLET_DONT
536         bool "not installed"
537         depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS
538         help
539           Do not install applet links. Useful when using the -install feature
540           or a standalone shell for rescue purposes.
541
542 endchoice
543
544 choice
545         prompt "/bin/sh applet link"
546         default INSTALL_SH_APPLET_SYMLINK
547         depends on INSTALL_APPLET_SCRIPT_WRAPPERS
548         help
549           Choose how you install /bin/sh applet link.
550
551 config INSTALL_SH_APPLET_SYMLINK
552         bool "as soft-link"
553         help
554           Install /bin/sh applet as soft-link to the busybox binary.
555
556 config INSTALL_SH_APPLET_HARDLINK
557         bool "as hard-link"
558         help
559           Install /bin/sh applet as hard-link to the busybox binary.
560
561 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
562         bool "as script wrapper"
563         help
564           Install /bin/sh applet as script wrapper that call the busybox
565           binary.
566
567 endchoice
568
569 config PREFIX
570         string "BusyBox installation prefix"
571         default "./_install"
572         help
573           Define your directory to install BusyBox files/subdirs in.
574
575 endmenu
576
577 source libbb/Config.in
578
579 endmenu
580
581 comment "Applets"
582
583 source archival/Config.in
584 source coreutils/Config.in
585 source console-tools/Config.in
586 source debianutils/Config.in
587 source editors/Config.in
588 source findutils/Config.in
589 source init/Config.in
590 source loginutils/Config.in
591 source e2fsprogs/Config.in
592 source modutils/Config.in
593 source util-linux/Config.in
594 source miscutils/Config.in
595 source networking/Config.in
596 source procps/Config.in
597 source shell/Config.in
598 source sysklogd/Config.in
599 source runit/Config.in
600 source selinux/Config.in
601 source printutils/Config.in