linux-pam/m4/ld-no-undefined.m4
Dmitry V. Levin 64d2ded89d Relevant BUGIDs:
Purpose of commit: new feature

Commit summary:
---------------
2010-10-19  Dmitry V. Levin  <ldv@altlinux.org>

	* m4/ld-no-undefined.m4: New file.
	* configure.in: Use PAM_LD_NO_UNDEFINED.
	* Makefile.am (M4_FILES): Add m4/ld-no-undefined.m4.
2010-10-19 16:48:32 +00:00

25 lines
633 B
Plaintext

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