How to check if a library is present during installation?
this is one of the working example from my module. I hope this helps you

function sfs_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'install' &amp;&amp; function_exists('libraries_get_path')) {
     $plupload_path = libraries_get_path('plupload');
     $chosen_path = libraries_get_path('chosen');
     if (!$plupload_path) {
       $requirements['plupload'] = array(
         'severity' =&gt; REQUIREMENT_ERROR,
         'description' =&gt; $t('Secure File Share module requires !plupload, which is missing. Download and extract the entire contents of the archive into the %path directory on your server.',  array('!plupload' =&gt; l($t('Plupload Library'), 'https://github.com/moxiecode/plupload/archive/v1.5.8.zip'), '%path' =&gt; 'sites/all/libraries/plupload')), 
       );
     }
     if (!$chosen_path) {
        $requirements['chosen_js'] = array(
          'severity' =&gt; REQUIREMENT_ERROR,
          'description' =&gt; $t('Secure File Share module requires !chosen, which is missing. Download and extract the entire contents of the archive into the %path directory on your server.', array('!chosen' =&gt; l($t('Chosen Library'), 'https://github.com/harvesthq/chosen/releases/download/v1.3.0/chosen_v1.3.0.zip'), '%path' =&gt; 'sites/all/libraries/chosen')),
        );
      }
  }
  return $requirements;
}




Karthik