Name

PREPENDDEF( )

Synopsis

The PREPENDDEF( ) m4 directive allows you to insert new information before that which was previously defined. To illustrate, consider a custom C-language library you want searched first during the loading phase of compiling, where the default list of libraries (for SunOS.5.7) looks like this:

-lsocket -lnsl

If you need to insert another library at the head of this list, without erasing what is already there, you can use this PREPENDDEF( ) directive:

PREPENDDEF(`confLIBS', `-llocal')

This causes the previous declaration to be prefixed with a new (third) library:

-llocal -lsocket -lnsl

Note that you can safely use this PREPENDDEF( ) directive when in doubt as to whether a macro has been given a value by default because no harm can be caused by prepending to an empty definition. (See also APPENDDEF( ).)

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.