diff options
Diffstat (limited to 'm4/dpkg-linker.m4')
-rw-r--r-- | m4/dpkg-linker.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/dpkg-linker.m4 b/m4/dpkg-linker.m4 new file mode 100644 index 000000000..9bd98f04a --- /dev/null +++ b/m4/dpkg-linker.m4 @@ -0,0 +1,15 @@ +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. + +# DPKG_LINKER_OPTIMISATIONS +# -------------------------- +# Add configure option to disable linker optimisations. +AC_DEFUN([DPKG_LINKER_OPTIMISATIONS], +[AC_ARG_ENABLE(linker-optimisations, + AS_HELP_STRING([--disable-linker-optimisations], + [Disable linker optimisations]), +[if test "x$enable_linker_optimisations" = "xno"; then + [LDFLAGS=$(echo "$LDFLAGS" | sed -e "s/ -Wl,-O[0-9]*\b//g")] +else + [LDFLAGS="$LDFLAGS -Wl,-O1"] +fi], [LDFLAGS="$LDFLAGS -Wl,-O1"])dnl +]) |