Skip to content

Commit 813d8ba

Browse files
committed
Do not error out if lib is symlinked to lib64
Distros are now creating a symlink between /lib and /lib64, and between /usr/lib and /usr/lib64, in accordance with recent agreements on file system conventions. Thus, if we detect that the package file exists in both places, check that the two locations are not symlinks before declaring ambiguity and exiting with an error. Signed-off-by: Ralph Castain <[email protected]>
1 parent 9082f44 commit 813d8ba

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

config/oac_check_package.m4

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dnl -*- autoconf -*-
22
dnl
33
dnl Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
44
dnl All Rights reserved.
5+
dnl Copyright (c) 2022 Nanook Consulting. All rights reserved.
56
dnl $COPYRIGHT$
67
dnl
78
dnl Additional copyrights may follow
@@ -315,9 +316,12 @@ AC_DEFUN([_OAC_CHECK_PACKAGE_PKGCONFIG], [
315316
[test -z "${check_package_prefix}"],
316317
[check_package_cv_$1_pcfilename="pcname"],
317318
[test -r "${check_package_prefix}/lib/pkgconfig/pcname.pc" -a -r "${check_package_prefix}/lib64/pkgconfig/pcname.pc"],
318-
[AC_MSG_ERROR([Found pcname in both ${check_package_prefix}/lib/pkgconfig and
319+
[AS_IF([test ! -L "${check_package_prefix}/lib" &&
320+
test ! -L "${check_package_prefix}/lib64"],
321+
[AC_MSG_ERROR([Found pcname in both ${check_package_prefix}/lib/pkgconfig and
319322
${check_package_prefix}/lib64/pkgconfig. This is confusing. Please add --with-$1-libdir=PATH
320323
to configure to help disambiguate.])],
324+
[check_package_cv_$1_pcfilename="${check_package_prefix}/lib/pkgconfig/pcname.pc"])],
321325
[test -r "${check_package_prefix}/lib64/pkgconfig/pcname.pc"],
322326
[check_package_cv_$1_pcfilename="${check_package_prefix}/lib64/pkgconfig/pcname.pc"],
323327
[check_package_cv_$1_pcfilename="${check_package_prefix}/lib/pkgconfig/pcname.pc"])])
@@ -603,9 +607,14 @@ AC_DEFUN([_OAC_CHECK_PACKAGE_GENERIC_PREFIX], [
603607
604608
AC_MSG_CHECKING([for $1 library (${check_package_generic_search_lib}) in ${check_package_prefix}])
605609
AS_IF([test ${check_package_generic_prefix_lib} -eq 1 -a ${check_package_generic_prefix_lib64} -eq 1],
606-
[AC_MSG_ERROR([Found library $check_package_generic_search_lib in both ${check_package_prefix}/lib and
610+
[AS_IF([test ! -L "${check_package_prefix}/lib" &&
611+
test ! -L "${check_package_prefix}/lib64"],
612+
[AC_MSG_ERROR([Found library $check_package_generic_search_lib in both ${check_package_prefix}/lib and
607613
${check_package_prefix}/lib64. This has confused configure. Please add --with-$1-libdir=PATH to configure to help
608614
disambiguate.])],
615+
[check_package_generic_prefix_happy=1
616+
$2_LDFLAGS=-L${check_package_prefix}/lib
617+
AC_MSG_RESULT([found -- lib])])],
609618
[test ${check_package_generic_prefix_lib} -eq 1],
610619
[check_package_generic_prefix_happy=1
611620
$2_LDFLAGS=-L${check_package_prefix}/lib

config/pmix_setup_libevent.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 2017-2019 Research Organization for Information Science
77
# and Technology (RIST). All rights reserved.
88
# Copyright (c) 2020 IBM Corporation. All rights reserved.
9-
# Copyright (c) 2021 Nanook Consulting. All rights reserved.
9+
# Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
1010
# Copyright (c) 2021-2022 Amazon.com, Inc. or its affiliates.
1111
# All Rights reserved.
1212
# $COPYRIGHT$
@@ -28,7 +28,7 @@
2828
#
2929
# Adds the following to the wrapper compilers:
3030
# * CPPFLAGS: none
31-
# * LDLFGAS: add pmix_libevent_LDFLAGS
31+
# * LDFLAGS: add pmix_libevent_LDFLAGS
3232
# * LIBS: add pmix_libevent_LIBS
3333
AC_DEFUN([PMIX_LIBEVENT_CONFIG],[
3434
PMIX_VAR_SCOPE_PUSH([pmix_event_dir pmix_event_libdir pmix_check_libevent_save_CPPFLAGS pmix_check_libevent_save_LDFLAGS pmix_check_libevent_save_LIBS])

0 commit comments

Comments
 (0)