summaryrefslogtreecommitdiffstats
path: root/m4/ld-no-undefined.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:38:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:38:36 +0000
commit26367bfc399cb3862f94ddca8fce87f98f26d67e (patch)
treeba3a4e02ed5ec62fe645dfa810c01d26decf591f /m4/ld-no-undefined.m4
parentInitial commit. (diff)
downloadpam-26367bfc399cb3862f94ddca8fce87f98f26d67e.tar.xz
pam-26367bfc399cb3862f94ddca8fce87f98f26d67e.zip
Adding upstream version 1.3.1.upstream/1.3.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/ld-no-undefined.m4')
-rw-r--r--m4/ld-no-undefined.m424
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/ld-no-undefined.m4 b/m4/ld-no-undefined.m4
new file mode 100644
index 0000000..b6db946
--- /dev/null
+++ b/m4/ld-no-undefined.m4
@@ -0,0 +1,24 @@
+# ld-no-undefined.m4 serial 1
+
+# Test if ld supports --no-undefined
+
+AC_DEFUN([PAM_LD_NO_UNDEFINED],
+ [
+ AC_CACHE_CHECK(whether ld supports --no-undefined,
+ pam_cv_ld_no_undefined, [ dnl
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -o conftest.o conftest.c
+ -Wl,--no-undefined 1>&AS_MESSAGE_LOG_FD])
+ then
+ pam_cv_ld_no_undefined=yes
+ LDFLAGS="$LDFLAGS -Wl,--no-undefined"
+ else
+ pam_cv_ld_no_undefined=no
+ fi
+ rm -f conftest*])
+ AC_SUBST(pam_cv_ld_no_undefined)
+ ]
+)