ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hallo,
I need you help with auitoconf. I have a project with existing source. I need to convert that program and include support for mysql.
Since I want to do it with the "right" way, I want to add the mysql autoconf macros I found at: ac-archive (http://ac-archive.sourceforge.net/ac...lib_mysql.html)
So, I have a few questions:
1. I want to make the ./configure script to check for the mysql.h and libmysqlclient.so files. Is that macro suitable for this?
2. Is there any other simpler way to do it?
3. The program's directory contains a subdirectory named "m4". Is this the target directory under which I have to add the macro? If not, how do I instruct autoconf to check for that macro?
And a final question: How do I instruct the ./configure && make to add the necessary -lmysqlclient -lz flags?
SUGGESTION:
I'd strongly encourage you to install a "virgin" copy of Linux on a VM.
EXAMPLE:
1) Download a prebuilt VM from here: http://www.thoughtpolice.co.uk/vmware/
Thank you for your answer. The tutorial is really good, but only for an initial work on the project. Still, I have no clue on how to include the mysql macro in the configure.ac or Makefile.am or whatever (Still, I don't know how to call it!)
3. The program's directory contains a subdirectory named "m4". Is this the target directory under which I have to add the macro? If not, how do I instruct autoconf to check for that macro?
Thank you all for your answers.
I have managed to add it (aclocal -I ./m4 without a training / was the key!)
Now, I have a final question. In my PC (on purpose in order to test the ./configure) I have not installed the mysql-dev package, thus, the mysql.h file is missing.
I use the AC_CHECK_HEADERS(mysql.h) - and I tried the AC_CHECK_HEADERS([mysql.h]) too.
./configure reports -correctly- that the mysql.h is not found. BUT, it continues till the end. I want to make ./configure to stop when the mysql.h is not found. How do I do that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.