frapa commented on a change in pull request #3932:
URL: https://github.com/apache/couchdb/pull/3932#discussion_r810503413



##########
File path: configure
##########
@@ -29,9 +29,14 @@ ERLANG_MD5="false"
 SKIP_DEPS=0
 
 COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
-SM_VSN=${SM_VSN:-"1.8.5"}
 ARCH="$(uname -m)"
 
+# Try to detect spidermonkey (libmozjs) version automatically
+SM_VSN=${SM_VSN:-$(/sbin/ldconfig -p | sed -n 's/.libmozjs-*\([0-9]*\).*/\1/p' 
| head -n 1)}
+if [ "$SM_VSN" = "185" ]; then
+  SM_VSN="1.8.5"
+fi
+

Review comment:
       If the version cannot be detected, the variable `SM_VSN` will be empty. 
I added an `elif` case exiting the configure script and warning the user. I 
hope that's good enough.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to