diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:22:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:22:51 +0000 |
commit | 9ada0093e92388590c7368600ca4e9e3e376f0d0 (patch) | |
tree | a56fe41110023676d7082028cbaa47ca4b6e6164 /m4/ld-O1.m4 | |
parent | Initial commit. (diff) | |
download | pam-upstream.tar.xz pam-upstream.zip |
Adding upstream version 1.5.2.upstream/1.5.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/ld-O1.m4')
-rw-r--r-- | m4/ld-O1.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/ld-O1.m4 b/m4/ld-O1.m4 new file mode 100644 index 0000000..6459328 --- /dev/null +++ b/m4/ld-O1.m4 @@ -0,0 +1,15 @@ +#!/usr/bin/m4 +dnl Check whether ld supports -O1 + +AC_DEFUN([PAM_LD_O1], [dnl + AC_CACHE_CHECK([whether ld supports -O1], + [pam_cv_ld_O1], + [saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-O1" + AC_LINK_IFELSE([AC_LANG_PROGRAM(,)], + [pam_cv_ld_O1=yes], + [pam_cv_ld_O1=no]) + LDFLAGS="$saved_LDFLAGS"]) + AS_IF([test $pam_cv_ld_O1 = yes], + [LDFLAGS="$LDFLAGS -Wl,-O1"]) +]) |