How To find if Specific Software is installed ?

Hi all,

I have developed an application in linux that uses MySQL and unixODBC. Now I am making a small installer for this application that configures environment for this application.
What I need is the way to check if MySQL and unixODBC is installed on the system before I start installing my application?
Note that I am not creating rpm file instead I am making another application that serves as the purpose of installer. So I want to know how can I check if MySQL is installed on any system using C/C++. Kindly share your knowledge and experience and if you didnt get my question then plz let me know...

Regards

Not only do you want to check to see if MySQL and unixODBC are installed on the platform but also are they configurated and operational.

You need to develop a port for each of the platforms you have in mind. For example on AIX it should be in makeinstallp format while HP-UX uses the sd format.

Ok... can someone tell me that is there any system call in Linux/Unix through which I can determine if some daemon/service is running or not. I mean as I can check while scripting as ` /etc/ini.d/mysqld status`... and this show me if the daemon is running or not. So is there any system call or function existing that I may use in C/C++ for checking if the mysqld is running or not. This is the way I have in my mind to check if the mysql is installed or not.. even if it installed and not running ... I can prompt then to the user ! (If someone has better idea then plz state it)