From 0b9967927470eeef73d01b95d6c6070ffa946aed Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 18 Mar 2013 16:34:01 -0400 Subject: [PATCH] Back out changes that broke detection of skey, opie and ldap libraries. --- configure | 39 +++++++++++++++++++++++++++++++++++++-- configure.in | 9 +++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/configure b/configure index da6634d7c..cb31b386b 100755 --- a/configure +++ b/configure @@ -19213,6 +19213,13 @@ if test "${with_skey-'no'}" = "yes"; then if test "$with_skey" != "yes"; then CPPFLAGS="${CPPFLAGS} -I${with_skey}/include" + if test X"$enable_rpath" = X"yes"; then + LDFLAGS="${LDFLAGS} -L${with_skey}/lib -R${with_skey}/lib" + else + LDFLAGS="${LDFLAGS} -L${with_skey}/lib" + fi + + if test X"$enable_rpath" = X"yes"; then SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_skey}/lib -R${with_skey}/lib" else @@ -19245,6 +19252,13 @@ fi CPPFLAGS="$O_CPPFLAGS" else + if test X"$enable_rpath" = X"yes"; then + LDFLAGS="${LDFLAGS} -L${dir}/lib -R${dir}/lib" + else + LDFLAGS="${LDFLAGS} -L${dir}/lib" + fi + + if test X"$enable_rpath" = X"yes"; then SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${dir}/lib -R${dir}/lib" else @@ -19377,6 +19391,13 @@ if test "${with_opie-'no'}" = "yes"; then if test "$with_opie" != "yes"; then CPPFLAGS="${CPPFLAGS} -I${with_opie}/include" + if test X"$enable_rpath" = X"yes"; then + LDFLAGS="${LDFLAGS} -L${with_opie}/lib -R${with_opie}/lib" + else + LDFLAGS="${LDFLAGS} -L${with_opie}/lib" + fi + + if test X"$enable_rpath" = X"yes"; then SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_opie}/lib -R${with_opie}/lib" else @@ -19425,6 +19446,13 @@ rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$O_CPPFLAGS" else + if test X"$enable_rpath" = X"yes"; then + LDFLAGS="${LDFLAGS} -L${dir}/lib -R${dir}/lib" + else + LDFLAGS="${LDFLAGS} -L${dir}/lib" + fi + + if test X"$enable_rpath" = X"yes"; then SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${dir}/lib -R${dir}/lib" else @@ -19723,7 +19751,7 @@ done fi if test ${with_ldap-'no'} != "no"; then - _LDFLAGS="$LDFLAGS" + O_LDFLAGS="$LDFLAGS" if test "$with_ldap" != "yes"; then if test X"$enable_rpath" = X"yes"; then @@ -19732,6 +19760,13 @@ if test ${with_ldap-'no'} != "no"; then SUDOERS_LDFLAGS="${SUDOERS_LDFLAGS} -L${with_ldap}/lib" fi + + if test X"$enable_rpath" = X"yes"; then + LDFLAGS="${LDFLAGS} -L${with_ldap}/lib -R${with_ldap}/lib" + else + LDFLAGS="${LDFLAGS} -L${with_ldap}/lib" + fi + CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include" with_ldap=yes fi @@ -20156,7 +20191,7 @@ $as_echo "$as_me: WARNING: Unable to locate gssapi.h, you will have to edit the SUDOERS_LIBS="${SUDOERS_LIBS} ${LDAP_LIBS}" LIBS="$_LIBS" - LDFLAGS="$_LDFLAGS" + LDFLAGS="$O_LDFLAGS" fi # diff --git a/configure.in b/configure.in index 4e72d156c..69462b10c 100644 --- a/configure.in +++ b/configure.in @@ -3016,6 +3016,7 @@ if test "${with_skey-'no'}" = "yes"; then O_LDFLAGS="$LDFLAGS" if test "$with_skey" != "yes"; then CPPFLAGS="${CPPFLAGS} -I${with_skey}/include" + SUDO_APPEND_LIBPATH(LDFLAGS, [${with_skey}/lib]) SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_skey}/lib]) AC_CHECK_HEADER([skey.h], [found=yes], [found=no], [#include ]) else @@ -3029,6 +3030,7 @@ if test "${with_skey-'no'}" = "yes"; then if test "$found" = "no" -o -z "$dir"; then CPPFLAGS="$O_CPPFLAGS" else + SUDO_APPEND_LIBPATH(LDFLAGS, [${dir}/lib]) SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${dir}/lib]) fi if test "$found" = "no"; then @@ -3064,6 +3066,7 @@ if test "${with_opie-'no'}" = "yes"; then O_LDFLAGS="$LDFLAGS" if test "$with_opie" != "yes"; then CPPFLAGS="${CPPFLAGS} -I${with_opie}/include" + SUDO_APPEND_LIBPATH(LDFLAGS, [${with_opie}/lib]) SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_opie}/lib]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include ]])], [found=yes], [found=no]) else @@ -3076,6 +3079,7 @@ if test "${with_opie-'no'}" = "yes"; then if test "$found" = "no" -o -z "$dir"; then CPPFLAGS="$O_CPPFLAGS" else + SUDO_APPEND_LIBPATH(LDFLAGS, [${dir}/lib]) SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${dir}/lib]) fi if test "$found" = "no"; then @@ -3143,9 +3147,10 @@ dnl dnl extra lib and .o file for LDAP support dnl if test ${with_ldap-'no'} != "no"; then - _LDFLAGS="$LDFLAGS" + O_LDFLAGS="$LDFLAGS" if test "$with_ldap" != "yes"; then SUDO_APPEND_LIBPATH(SUDOERS_LDFLAGS, [${with_ldap}/lib]) + SUDO_APPEND_LIBPATH(LDFLAGS, [${with_ldap}/lib]) CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include" with_ldap=yes fi @@ -3237,7 +3242,7 @@ if test ${with_ldap-'no'} != "no"; then SUDOERS_LIBS="${SUDOERS_LIBS} ${LDAP_LIBS}" LIBS="$_LIBS" - LDFLAGS="$_LDFLAGS" + LDFLAGS="$O_LDFLAGS" fi #