Add --with-blibpath for AIX. An alternate libpath may be specified or
-blibpath support can be disabled. Also change conifgure such that -blibpath is not specified if no -L libpaths were added to SUDO_LDFLAGS.
This commit is contained in:
32
configure.in
32
configure.in
@@ -148,11 +148,18 @@ esac])
|
|||||||
AC_ARG_WITH(rpath, [ --with-rpath pass -R flag in addition to -L for lib paths],
|
AC_ARG_WITH(rpath, [ --with-rpath pass -R flag in addition to -L for lib paths],
|
||||||
[case $with_rpath in
|
[case $with_rpath in
|
||||||
yes) ;;
|
yes) ;;
|
||||||
no) with_rpath=no
|
no) ;;
|
||||||
;;
|
|
||||||
*) AC_MSG_ERROR(["--with-rpath does not take an argument."])
|
*) AC_MSG_ERROR(["--with-rpath does not take an argument."])
|
||||||
;;
|
;;
|
||||||
esac], [with_rpath=no])
|
esac])
|
||||||
|
|
||||||
|
AC_ARG_WITH(blibpath, [ --with-blibpath[=PATH] pass -blibpath flag to ld for additional lib paths],
|
||||||
|
[case $with_blibpath in
|
||||||
|
yes) ;;
|
||||||
|
no) ;;
|
||||||
|
*) AC_MSG_NOTICE([will pass -blibpath:${with_blibpath} to the loader.])
|
||||||
|
;;
|
||||||
|
esac])
|
||||||
|
|
||||||
AC_ARG_WITH(incpath, [ --with-incpath additional places to look for include files],
|
AC_ARG_WITH(incpath, [ --with-incpath additional places to look for include files],
|
||||||
[case $with_incpath in
|
[case $with_incpath in
|
||||||
@@ -1205,13 +1212,21 @@ case "$host" in
|
|||||||
CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
|
CPPFLAGS="${CPPFLAGS} -D_XOPEN_EXTENDED_SOURCE"
|
||||||
SUDO_DEFINE(_ALL_SOURCE)
|
SUDO_DEFINE(_ALL_SOURCE)
|
||||||
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
|
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-bI:\$(srcdir)/aixcrypt.exp"
|
||||||
|
if test X"$with_blibpath" != X"no"; then
|
||||||
AC_MSG_CHECKING([if linker accepts -Wl,-blibpath])
|
AC_MSG_CHECKING([if linker accepts -Wl,-blibpath])
|
||||||
O_LDFLAGS="$LDFLAGS"
|
O_LDFLAGS="$LDFLAGS"
|
||||||
LDFLAGS="$LDFLAGS -Wl,-blibpath:/usr/lib:/lib"
|
LDFLAGS="$LDFLAGS -Wl,-blibpath:/usr/lib:/lib"
|
||||||
AC_TRY_LINK([], [], [
|
AC_TRY_LINK([], [], [
|
||||||
|
if test -n "$with_blibpath" -a "$with_blibpath" != "yes"; then
|
||||||
|
blibpath="$with_blibpath"
|
||||||
|
elif test -n "$GCC"; then
|
||||||
|
blibpath="/usr/lib:/lib:/usr/local/lib"
|
||||||
|
else
|
||||||
blibpath="/usr/lib:/lib"
|
blibpath="/usr/lib:/lib"
|
||||||
|
fi
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
], [AC_MSG_RESULT(no)])
|
], [AC_MSG_RESULT(no)])
|
||||||
|
fi
|
||||||
LDFLAGS="$O_LDFLAGS"
|
LDFLAGS="$O_LDFLAGS"
|
||||||
;;
|
;;
|
||||||
*-*-hiuxmpp*)
|
*-*-hiuxmpp*)
|
||||||
@@ -1957,9 +1972,16 @@ if test "$with_authenticate" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Add $blibpath to SUDO_LDFLAGS
|
dnl Add $blibpath to SUDO_LDFLAGS if specified by the user or if we
|
||||||
|
dnl added -L dirpaths to SUDO_LDFLAGS.
|
||||||
dnl
|
dnl
|
||||||
test X"$blibpath" != X"" && SUDO_LDFLAGS="$SUDO_LDFLAGS -Wl,-blibpath:$blibpath"
|
if test -n "$blibpath"; then
|
||||||
|
if test -n "$blibpath_add"; then
|
||||||
|
SUDO_LDFLAGS="$SUDO_LDFLAGS -Wl,-blibpath:${blibpath}${blibpath_add}"
|
||||||
|
elif test -n "$with_blibpath" -a "$with_blibpath" != "yes"; then
|
||||||
|
SUDO_LDFLAGS="$SUDO_LDFLAGS -Wl,-blibpath:${blibpath}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for log file and timestamp locations
|
dnl Check for log file and timestamp locations
|
||||||
|
Reference in New Issue
Block a user