AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

peti_enable_dynamic_link

Back to the Main Page.

Synopsis
PETI_ENABLE_DYNAMIC_LINK
, 
Version

2006-06-04

Author

Peter Simons <simons@cryp.to>

License

AllPermissive
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Users of this software should generally follow the principles of the MIT License includings its disclaimer.

Category

cryp.to ac-archive's Obsoleted (obsoleted)

Documentation

  • obsoleted Deprecated with the advent of GNU Libtool.

Add a command-line flag to enable/disable dynamic linking.

Calling this macro adds the flag "--enable-dynamic-link" to command-line. When disabled, the compiler/linker flag "-static" is added to "$LDFLAGS". The default is dynamic linkage.

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))
])dnl