diff options
-rw-r--r-- | configure.ac | 77 | ||||
-rw-r--r-- | nss/Makefile.am | 13 | ||||
-rw-r--r-- | nss/exports.glibc (renamed from nss/nss_ldap.map) | 0 | ||||
-rw-r--r-- | pam/Makefile.am | 8 | ||||
-rw-r--r-- | pam/exports.solaris | 16 |
5 files changed, 32 insertions, 82 deletions
diff --git a/configure.ac b/configure.ac index edc675c..61cb551 100644 --- a/configure.ac +++ b/configure.ac @@ -298,23 +298,6 @@ then AC_DEFINE(__thread,,[Define to empty if compiler does not support `__thread' keyword.]) fi -# check how to pass a symbol map to the linker -AC_MSG_CHECKING([how linker wants the symbol map]) -if $CC -Wl,--help 2>&1 | grep -- --version-script >/dev/null -then - VERSION_SCRIPT_FLAG="-Wl,--version-script," - AC_SUBST(VERSION_SCRIPT_FLAG) - AC_MSG_RESULT([--version-script]) -elif $CC -Wl,--help 2>&1 | grep -- '-M mapfile' >/dev/null -then - VERSION_SCRIPT_FLAG="-Wl,-M," - AC_SUBST(VERSION_SCRIPT_FLAG) - AC_MSG_RESULT([-M]) -else - AC_MSG_RESULT([unknown, not passing symbol map]) -fi -AM_CONDITIONAL([HAVE_VERSION_SCRIPT_FLAG], [test "x${VERSION_SCRIPT_FLAG}" != x]) - # check for support for the struct ether_addr structure AC_CHECK_TYPES(struct ether_addr,,,[ #include <sys/socket.h> @@ -427,6 +410,21 @@ then NSS_MODULE_OBJS="`echo "$with_nss_ldap_maps " | sed 's/,/ /g;s/ */.$(OBJEXT) /g'`" AC_SUBST(NSS_MODULE_OBJS) + # find out how to link the library + case "$target_os" in + solaris*) + if test "$ac_cv_prog_gcc" = yes; then + nss_ldap_so_LD="/usr/ccs/bin/ld" + AC_SUBST(nss_ldap_so_LD) + fi + nss_ldap_so_LDFLAGS="-Bdirect -z nodelete -Bdynamic -M \$(srcdir)/exports.solaris -G" + ;; + *) + nss_ldap_so_LDFLAGS="-shared -Wl,-h,\$(NSS_LDAP_SONAME) -Wl,--version-script,\$(srcdir)/exports.glibc" + ;; + esac + AC_SUBST(nss_ldap_so_LDFLAGS) + # restore CFLAGS and LIBS CFLAGS="$nss_save_CFLAGS" LIBS="$nss_save_LIBS" @@ -464,6 +462,21 @@ then AC_REPLACE_FUNCS(pam_get_authtok pam_prompt) AC_CHECK_FUNCS(pam_modutil_getpwnam pam_syslog) + # find out how to link the library + case "$target_os" in + solaris*) + if test "$ac_cv_prog_gcc" = yes; then + pam_ldap_so_LD="/usr/ccs/bin/ld" + AC_SUBST(pam_ldap_so_LD) + fi + pam_ldap_so_LDFLAGS="-Bdirect -z nodelete -Bdynamic -M \$(srcdir)/pam_ldap.map -G" + ;; + *) + pam_ldap_so_LDFLAGS="-shared -Wl,--version-script,\$(srcdir)/pam_ldap.map" + ;; + esac + AC_SUBST(pam_ldap_so_LDFLAGS) + # restore CFLAGS and LIBS CFLAGS="$pam_save_CFLAGS" LIBS="$pam_save_LIBS" @@ -680,36 +693,6 @@ then AC_SUBST(nslcd_LIBS) fi -# Always use native linker on Solaris -# but only invoke directly if compiling with gcc (?) -case "$target_os" in -solaris*) if test "$ac_cv_prog_gcc" = yes; then - nss_ldap_so_LD="/usr/ccs/bin/ld" - pam_ldap_so_LD="/usr/ccs/bin/ld" - fi - nss_ldap_so_LDFLAGS="-Bdirect -z nodelete -Bdynamic -M \$(srcdir)/exports.solaris -G" - pam_ldap_so_LDFLAGS="-Bdirect -z nodelete -Bdynamic -M \$(srcdir)/exports.solaris -G" - TARGET_OS="SUNOS" ;; -linux*) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux" - pam_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux" - TARGET_OS="LINUX" ;; -*) nss_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic" - pam_ldap_so_LDFLAGS="-shared -Wl,-Bdynamic" -esac - -AC_SUBST(nss_ldap_so_LD) -AC_SUBST(nss_ldap_so_LDFLAGS) - -AC_SUBST(pam_ldap_so_LD) -AC_SUBST(pam_ldap_so_LDFLAGS) - -AC_SUBST(AIX64SUFFIX) -AM_CONDITIONAL(GCC, test "$GCC" = "yes") -AM_CONDITIONAL(GLIBC, test "$target_os" = "linux" -o "$target_os" = "linux-gnu") -AM_CONDITIONAL(USE_NATIVE_LINKER, test -n "$nss_ldap_so_LD") -AM_CONDITIONAL(SUNOS, test "x${TARGET_OS}" = "xSUNOS") -AM_CONDITIONAL(LINUX, test "x${TARGET_OS}" = "xLINUX") - # generate files AC_CONFIG_FILES([Makefile compat/Makefile common/Makefile nss/Makefile pam/Makefile nslcd/Makefile man/Makefile tests/Makefile]) diff --git a/nss/Makefile.am b/nss/Makefile.am index bd89de4..712c20e 100644 --- a/nss/Makefile.am +++ b/nss/Makefile.am @@ -34,18 +34,7 @@ EXTRA_nss_ldap_so_SOURCES = aliases.c ethers.c group.c hosts.c netgroup.c \ nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS) nss_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a $(NSS_MODULE_OBJS) -nss_ldap_so_LDFLAGS = @nss_ldap_so_LDFLAGS@ -if HAVE_VERSION_SCRIPT_FLAG -nss_ldap_so_LDFLAGS += $(VERSION_SCRIPT_FLAG)\$(srcdir)/nss_ldap.map -endif - -if USE_NATIVE_LINKER -nss_ldap_so_LINK = @nss_ldap_so_LD@ @nss_ldap_so_LDFLAGS@ -o $@ -else -nss_ldap_so_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAG) -o $@ -endif - -EXTRA_DIST = nss_ldap.map +EXTRA_DIST = exports.glibc exports.solaris install-exec-local: install-nss_ldap_so uninstall-local: uninstall-nss_ldap_so diff --git a/nss/nss_ldap.map b/nss/exports.glibc index 0ed5ea2..0ed5ea2 100644 --- a/nss/nss_ldap.map +++ b/nss/exports.glibc diff --git a/pam/Makefile.am b/pam/Makefile.am index e6674fe..dca583f 100644 --- a/pam/Makefile.am +++ b/pam/Makefile.am @@ -28,13 +28,7 @@ pam_ldap_so_SOURCES = ../nslcd.h ../common/nslcd-prot.h \ pam_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a -lpam \ ../compat/libcompat.a -if USE_NATIVE_LINKER -pam_ldap_so_LINK = @pam_ldap_so_LD@ @pam_ldap_so_LDFLAGS@ -o $@ -else -pam_ldap_so_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAG) -o $@ -endif - -EXTRA_DIST = pam_ldap.map exports.solaris +EXTRA_DIST = pam_ldap.map install-exec-local: install-pam_ldap_so uninstall-local: uninstall-pam_ldap_so diff --git a/pam/exports.solaris b/pam/exports.solaris deleted file mode 100644 index 02bcf2a..0000000 --- a/pam/exports.solaris +++ /dev/null @@ -1,16 +0,0 @@ -pam_ldap.so { - - # published PAM service functions - global: - pam_sm_acct_mgmt; - pam_sm_authenticate; - pam_sm_chauthtok; - pam_sm_close_session; - pam_sm_open_session; - pam_sm_setcred; - - # everything else should not be exported - local: - *; - -}; |