README revision 60484
133965SjdpThis directory contains the -liberty library of free software.
233965SjdpIt is a collection of subroutines used by various GNU programs.
333965SjdpCurrent members include:
433965Sjdp
533965Sjdp	getopt -- get options from command line
633965Sjdp	obstack -- stacks of arbitrarily-sized objects
733965Sjdp	strerror -- error message strings corresponding to errno
833965Sjdp	strtol -- string-to-long conversion
933965Sjdp	strtoul -- string-to-unsigned-long conversion
1033965Sjdp
1133965SjdpWe expect many of the GNU subroutines that are floating around to
1233965Sjdpeventually arrive here.
1333965Sjdp
1438889SjdpThe library must be configured from the top source directory.  Don't
1538889Sjdptry to run configure in this directory.  Follow the configuration
1638889Sjdpinstructions in ../README.
1733965Sjdp
1833965SjdpPlease report bugs and fixes to "bug-gnu-utils@prep.ai.mit.edu".  Thank you.
1933965Sjdp
2033965SjdpADDING A NEW FILE
2133965Sjdp=================
2233965Sjdp
2333965SjdpThere are two sets of files:  Those that are "required" will be
2433965Sjdpincluded in the library for all configurations, while those
2533965Sjdpthat are "optional" will be included in the library only if "needed."
2633965Sjdp
2733965SjdpTo add a new required file, edit Makefile to add the source file
2833965Sjdpname to CFILES and the object file to REQUIRED_OFILES.
2933965Sjdp
3060484SobrienTo add a new optional file, it must provide a single function, and the
3160484Sobrienname of the function must be the same as the name of the file.
3233965Sjdp
3360484Sobrien    * Add the source file name to CFILES.
3433965Sjdp
3560484Sobrien    * Add the function to name to the funcs shell variable in
3660484Sobrien      configure.in.
3733965Sjdp
3860484Sobrien    * Add the function to the AC_CHECK_FUNCS lists just after the
3960484Sobrien      setting of the funcs shell variable.  These AC_CHECK_FUNCS calls
4060484Sobrien      are never executed; they are there to make autoheader work
4160484Sobrien      better.
4233965Sjdp
4360484Sobrien    * Consider the special cases of building libiberty; as of this
4460484Sobrien      writing, the special cases are newlib and VxWorks.  If a
4560484Sobrien      particular special case provides the function, you do not need
4660484Sobrien      to do anything.  If it does not provide the function, add the
4760484Sobrien      object file to LIBOBJS, and add the function name to the case
4860484Sobrien      controlling whether to define HAVE_func.
4933965Sjdp
5060484SobrienThe optional file you've added (e.g. getcwd.c) should compile and work
5160484Sobrienon all hosts where it is needed.  It does not have to work or even
5260484Sobriencompile on hosts where it is not needed.
5333965Sjdp
5433965SjdpADDING A NEW CONFIGURATION
5533965Sjdp==========================
5633965Sjdp
5733965SjdpOn most hosts you should be able to use the scheme for automatically
5833965Sjdpfiguring out which files are needed.  In that case, you probably
5933965Sjdpdon't need a special Makefile stub for that configuration.
6033965Sjdp
6133965SjdpIf the fully automatic scheme doesn't work, you may be able to get
6233965Sjdpby with defining EXTRA_OFILES in your Makefile stub.  This is
6333965Sjdpa list of object file names that should be treated as required
6433965Sjdpfor this configuration - they will be included in libiberty.a,
6560484Sobrienregardless of whatever might be in the C library.
66