From: Javi <ja...@gs...> - 2004-03-21 13:15:06
|
Hi Michael, hi all. > Fine! Already checked in into CVS, but with some modifications: >... > - I prepared some SQL examples in the lcd4linux.conf.sample > I hope this works, because I cannot test it... All works fine with some minor changes in sample.conf. See patch.txt > The most imnportant thing would be a better autoconf makro which does > not only check for mysql.h, but for libmyslq, too, and add this library > to the CFLAGS or LFLAGS. I don't know about using Automake and Autoconf, but googleing I've found that,hope that it helps: (http://www.murrayc.com/learning/linux/using_libraries/using_libraries.shtml) Libraries with no macro and no script: There are still many libraries which do not use *-config scripts or macros to make your life easier. The best thing to do in this situation is to allow the user to tell the configure script where to find the library. You can do this with the AM_ARG_WITH() macro. This adds a command line argument to the configure script and complains if it isn't used. For instance: # Ask user for path to libmysqlclient stuff:. AC_ARG_WITH(mysql, [ --with-mysql=<path> prefix of MySQL installation. e.g. /usr/local or /usr], [MYSQL_PREFIX=$with_mysql], AC_MSG_ERROR([You must call configure with the --with-mysql option. This tells configure where to find the MySql C library and headers. e.g. --with-mysql=/usr/local or --with-mysql=/usr]) ) AC_SUBST(MYSQL_PREFIX) MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql -lmysqlclient" MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include" AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) Bye Javi |