What happens when you acquire a company and then find later that its books have been a bit cooked?

Tech giant HP is finding out this week. Today, the company announced that it will be incurring a massive $5-billion charge and blaming it on a raft of improprieties, misrepresentation and disclosure failures at software firm Autonomy (News - Alert), which it acquired last October for $11.1 billion.

It took a whistleblower to come forward to expose what HP is calling "serious accounting improprieties" and "a willful effort by Autonomy to mislead shareholders,” Reuters is reporting today.

This is one more very unneeded blow to HP, which has seen more than its share of problems as of late, including a virtual revolving door of CEOs, overall management turnover and challenges in its core personal computer and printer businesses.

For its part, Autonomy management is denying the allegations.

“The former management team of Autonomy was shocked to see this statement today, and flatly rejects these allegations, which are false," a spokesperson for former Autonomy chief executive Mike Lynch said in a brief statement to Reuters (News - Alert).

Lynch left HP this past May, and it was reported at the time that he was “pushed” by HP management.

Autonomy, founded in Cambridge, England, offers a variety of enterprise search and knowledge management applications using adaptive pattern recognition techniques based on something called “Bayesian inference,” together with traditional methods. Its platform attempts to make sense out of any form of unstructured information, including text, voice and video, and based on that understanding perform automatic operations.

Today, as a subsidiary of HP, Autonomy has joint headquarters in both Cambridge and San Francisco.

HP said it has referred the matter to the U.S. Securities and Exchange Commission's enforcement division and the U.K.'s Serious Fraud Office for civil and criminal investigation. It said it will take legal action to recoup “what we can for our shareholders,” reported Reuters.