Building laws in Algarve

I am currently in negotiation to buy a villa and land just outside Albufeira. The purchase also includes a business and a very small warehouse/barn. Additionally, the warehouse/barn has a small cottage attached. Upon questioning the vendor, I discovered that the villa was legally built and had all appropriate licenses but the warehouse and cottage did not - in fact they are built on agricutural land. The vendor did not appear very concerned and, in fact, was able to show me numerous buildings in the surrounding area which were unlicensed.
I am very interested in the business and the villa/land but I am concerned about the illegality of the building work. I am worried that the cottage and warehouse could be pulled down, thereby jeopardising the business.
Does any one have any thoughts? Should I be concerned? Is there a way to sort things out?
Thanks.

You should be concerned. Ilegal building can and are in fact demolished. Check with the Câmara if you can submit a project for it to get approved. The best solution would be to submit a "Pedido de Informação prévio" to the Câmara.

This is a simple process and assures you that if the Câmara says it's ok that you have one year to submit and get your project approved.

The fact that there are other ilegal buildings doesn´t make that building more legal does it?

Thanks f_ribeiro - your point is well made. The owner of the villa and business has been operating for almost 10 years now and has been officially declaring his business to the authorities without any hassle to date. Have you any idea what sort of chance there is that the Pedido de Informação prévio would be successful. Is it something I should build into any offer I make as a pre-requisite to the deal going through?
Thanks again.

"what sort of chance there is that the Pedido de Informação prévio would be successful" - no idea but a quick meeting with the camara, specifically with the architect responsible for the area, would give you an answer to that.

"Is it something I should build into any offer I make as a pre-requisite to the deal going through?" - if you want to play by the safe side, yes. This should be the rule for anyone buying a peace of land to build or with something built with permit.