Point 1 and 3 of your question you can solve with following Java code:
try {
String version = com.ibm.xsp.extlib.util.ExtLibUtil.getExtLibVersion();
} catch (Exception e) {
// ExtLib not installed
}
If Extension Library is installed properly then you get the version
. Otherwise an exception will be thrown and you can handle this case in catch
block.
If you are developing in LotusScript then put this code into an Java agent and execute it from LotusScript.
For point 2 you have to add the line
xsp.library.depends=com.ibm.xsp.extlib.library
to file WebContent/WEB-INF/xsp.properties
.