Back to the Main Page.

peti_enable_dynamic_linking

Download the M4 Source.

Synopsis

PETI_ENABLED_DYNAMIC_LINKING

Version

1.3 (2003/04/16)     0.5.65   :   Miscellaneous

Author

Peter Simons <simons@computer.org>

Description
obsoleted - if you need it then contact the original author
! This macro give the user a comfortable way to add "-static" to the linker flags, that is, to build statically linked binaries. Currently only the "-static" flags is used to achieve that, but on some operating systems, more sophisticated LDFLAGS might be necessary.

M4 Source Code
AC_DEFUN([PETI_ENABLED_DYNAMIC_LINKING], [
AC_MSG_CHECKING(whether what 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))
])