[Macro Index Page] [Download M4 Source]

peti_enable_dynamic_link

Synopsis

PETI_ENABLE_DYNAMIC_LINK

Description

Calling this macro adds the flag --enable-dynamic-link to the command-line options supported by the configure script. This option effectively controls whether the compiler/linker flag -static is added to $LDFLAGS or not. The default is to link dynamically.

Version

1.2 (last modified: 2003-01-15)

Author

Peter Simons

M4 Source Code

AC_DEFUN([PETI_ENABLE_DYNAMIC_LINK], [
AC_MSG_CHECKING(what kind of binaries we shall create)
AC_ARG_ENABLE(dynamic-link,
[  --enable-dynamic-link   Create dynamically-linked binaries (default)],
if test "$enableval" = "yes"; then
    AC_MSG_RESULT(dynamically linked)
else
    LDFLAGS="$LDFLAGS -static"
    AC_MSG_RESULT(statically linked)
fi,
AC_MSG_RESULT(dynamically linked))
])

Copyright

GNU General Public License with this special exception.