lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1250 - in nss-pam-ldapd-solaris: . nss pam

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1250 - in nss-pam-ldapd-solaris: . nss pam



Author: arthur
Date: Sun Oct 10 21:18:43 2010
New Revision: 1250
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1250

Log:
put all locgic on how to link in configure script (remove stuff from 
Makefile.ams) and make choice for NSS and PAM components independently 
(renaming and removing version scripts as needed)

Added:
   nss-pam-ldapd-solaris/nss/exports.glibc
      - copied unchanged from r1249, nss-pam-ldapd-solaris/nss/nss_ldap.map
Deleted:
   nss-pam-ldapd-solaris/nss/nss_ldap.map
   nss-pam-ldapd-solaris/pam/exports.solaris
Modified:
   nss-pam-ldapd-solaris/configure.ac
   nss-pam-ldapd-solaris/nss/Makefile.am
   nss-pam-ldapd-solaris/pam/Makefile.am

Modified: nss-pam-ldapd-solaris/configure.ac
==============================================================================
--- nss-pam-ldapd-solaris/configure.ac  Sat Oct  9 22:10:27 2010        (r1249)
+++ nss-pam-ldapd-solaris/configure.ac  Sun Oct 10 21:18:43 2010        (r1250)
@@ -298,23 +298,6 @@
   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 @@
   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 @@
   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 @@
   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])

Modified: nss-pam-ldapd-solaris/nss/Makefile.am
==============================================================================
--- nss-pam-ldapd-solaris/nss/Makefile.am       Sat Oct  9 22:10:27 2010        
(r1249)
+++ nss-pam-ldapd-solaris/nss/Makefile.am       Sun Oct 10 21:18:43 2010        
(r1250)
@@ -34,18 +34,7 @@
 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

Modified: nss-pam-ldapd-solaris/pam/Makefile.am
==============================================================================
--- nss-pam-ldapd-solaris/pam/Makefile.am       Sat Oct  9 22:10:27 2010        
(r1249)
+++ nss-pam-ldapd-solaris/pam/Makefile.am       Sun Oct 10 21:18:43 2010        
(r1250)
@@ -28,13 +28,7 @@
 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
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits