Skip to content

Commit 5d208a1

Browse files
Merge pull request #4407 from ggouaillardet/topic/configury_zlib
configury: fix handling of --with-zlib=DIR and --with-zlib-libdir=DIR…
2 parents 05f98d6 + 5a816a9 commit 5d208a1

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

config/opal_setup_zlib.m4

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
55
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
6+
# Copyright (c) 2017 Research Organization for Information Science
7+
# and Technology (RIST). All rights reserved.
68
# $COPYRIGHT$
79
#
810
# Additional copyrights may follow
@@ -27,25 +29,29 @@ AC_DEFUN([OPAL_ZLIB_CONFIG],[
2729
if test "$with_zlib" != "no"; then
2830
AC_MSG_CHECKING([for zlib in])
2931
if test ! -z "$with_zlib" && test "$with_zlib" != "yes"; then
32+
AC_MSG_RESULT([$with_zlib])
3033
opal_zlib_dir=$with_zlib
3134
opal_zlib_standard_header_location=no
32-
if test -d $with_zlib/lib; then
33-
opal_zlib_libdir=$with_zlib/lib
34-
elif test -d $with_zlib/lib64; then
35-
opal_zlib_libdir=$with_zlib/lib64
36-
else
37-
AC_MSG_RESULT([Could not find $with_zlib/lib or $with_zlib/lib64])
38-
AC_MSG_ERROR([Can not continue])
39-
fi
40-
AC_MSG_RESULT([$opal_zlib_dir and $opal_zlib_libdir])
35+
opal_zlib_standard_lib_location=no
36+
AS_IF([test -z "$with_zlib_libdir" || test "$with_zlib_libdir" = "yes"],
37+
[if test -d $with_zlib/lib; then
38+
opal_zlib_libdir=$with_zlib/lib
39+
elif test -d $with_zlib/lib64; then
40+
opal_zlib_libdir=$with_zlib/lib64
41+
else
42+
AC_MSG_RESULT([Could not find $with_zlib/lib or $with_zlib/lib64])
43+
AC_MSG_ERROR([Can not continue])
44+
fi
45+
AC_MSG_RESULT([$opal_zlib_dir and $opal_zlib_libdir])],
46+
[AC_MSG_RESULT([$with_zlib_libdir])])
4147
else
4248
AC_MSG_RESULT([(default search paths)])
4349
opal_zlib_standard_header_location=yes
50+
opal_zlib_standard_lib_location=yes
4451
fi
4552
AS_IF([test ! -z "$with_zlib_libdir" && test "$with_zlib_libdir" != "yes"],
4653
[opal_zlib_libdir="$with_zlib_libdir"
47-
opal_zlib_standard_lib_location=no],
48-
[opal_zlib_standard_lib_location=yes])
54+
opal_zlib_standard_lib_location=no])
4955

5056
OPAL_CHECK_PACKAGE([opal_zlib],
5157
[zlib.h],

0 commit comments

Comments
 (0)