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