]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Simplify handling of --with-ssl-dir.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 11 Feb 2022 09:09:32 +0000 (20:09 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 11 Feb 2022 09:09:32 +0000 (20:09 +1100)
ok djm@

configure.ac

index c10ac8a180a23e3823ff7818f8e959833597a67e..062682be00416f660ea97f4caaa170a5b056a42d 100644 (file)
@@ -2639,23 +2639,17 @@ AC_ARG_WITH([ssl-dir],
                                ./*|../*)       withval="`pwd`/$withval"
                        esac
                        if test -d "$withval/lib"; then
-                               if test -n "${rpath_opt}"; then
-                                       LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval}/lib ${LDFLAGS}"
-                               fi
+                               libcrypto_path="${withval}/lib"
                        elif test -d "$withval/lib64"; then
-                               if test -n "${rpath_opt}"; then
-                                       LDFLAGS="-L${withval}/lib64 ${rpath_opt}${withval}/lib64 ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
-                               fi
+                               libcrypto_path="$withval/lib64"
                        else
-                               if test -n "${rpath_opt}"; then
-                                       LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}"
-                               else
-                                       LDFLAGS="-L${withval} ${LDFLAGS}"
-                               fi
+                               # Built but not installed
+                               libcrypto_path="${withval}"
+                       fi
+                       if test -n "${rpath_opt}"; then
+                               LDFLAGS="-L${libcrypto_path} ${rpath_opt}${libcrypto_path} ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${libcrypto_path} ${LDFLAGS}"
                        fi
                        if test -d "$withval/include"; then
                                CPPFLAGS="-I${withval}/include ${CPPFLAGS}"