summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2010-10-19 16:48:32 +0000
committerDmitry V. Levin <ldv@altlinux.org>2010-10-19 16:48:32 +0000
commit64d2ded89df33d22d604ae0672156c47963689c0 (patch)
tree1cc6ad73b52bf413e853800511fe60836b12fdaf
parentef7534f700b8254c6a72e47607c9bf3e8880d446 (diff)
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.
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.am5
-rw-r--r--configure.in1
-rw-r--r--m4/ld-no-undefined.m424
4 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 41bc2e6a..9f6687cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
* m4/ld-O1.m4 (PAM_LD_O1): Fix typo.
+ * 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 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_env/pam_env.8.xml: Document side effects of
diff --git a/Makefile.am b/Makefile.am
index 796a9507..69d09f63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,8 +14,9 @@ CLEANFILES = *~
M4_FILES = m4/gettext.m4 m4/iconv.m4 m4/intlmacosx.m4 \
m4/japhar_grep_cflags.m4 m4/jh_path_xml_catalog.m4 \
- m4/ld-as-needed.m4 m4/ld-O1.m4 m4/lib-ld.m4 m4/lib-link.m4 \
- m4/lib-prefix.m4 m4/libprelude.m4 m4/libtool.m4 m4/nls.m4 \
+ m4/ld-as-needed.m4 m4/ld-no-undefined.m4 m4/ld-O1.m4 \
+ m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 \
+ m4/libprelude.m4 m4/libtool.m4 m4/nls.m4 \
m4/po.m4 m4/progtest.m4
EXTRA_DIST = config.rpath mkinstalldirs pgp.keys.asc CHANGELOG \
diff --git a/configure.in b/configure.in
index 76fac05f..397e0159 100644
--- a/configure.in
+++ b/configure.in
@@ -84,6 +84,7 @@ AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
PAM_LD_AS_NEEDED
+PAM_LD_NO_UNDEFINED
PAM_LD_O1
dnl Largefile support
diff --git a/m4/ld-no-undefined.m4 b/m4/ld-no-undefined.m4
new file mode 100644
index 00000000..b6db946a
--- /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)
+ ]
+)