First off, thank you for this great project, it is really useful. 

I apologize if this has been asked before (I searched the mailing list but 
couldn't come up with anything) but I'm having a hard time detecting the 
soci/soci-mysql.h and 
 soci/backends/mysql/soci-mysql.h headers in my configure.ac. 

I'll admit I'm relatively new to both soci and the autotools build system, and 
since the soci backend modules don't provide pkgconfigs (I've installed all of 
them via yum on Fedora 11, including the devel versions), my current approach 
to detecting if a backend is installed on my system is to check the headers

Unfortunately while the test for soci/soci.h succeeds, the other tests for the 
backend headers fail for whatever reason. Here is a sample configure.ac I wrote 
demonstrating the issue:

AC_PREREQ(2.61)
AC_INIT(romic, 0.1.0, [email protected])

AC_PROG_CXX
AC_LANG(C++)

AC_CHECK_HEADERS([soci/soci.h],,
                 AC_MSG_ERROR([cannot find soci headers]), -)

AC_CHECK_HEADERS([soci/soci-mysql.h],,
                 AC_MSG_ERROR([cannot find soci mysql headers]), -)
AC_OUTPUT


Note I'm even using '-' as the last argument, which according to 
http://www.gnu.org/software/autoconf/manual/html_node/Generic-Headers.html#Generic-Headers 
 tells autotools to just check for the existance of the file on the include 
path and nothing else.

I generated the configure script using "autoreconf --force --install -I config 
-I m4" , and ran it with the standard "./configure" which results in:

<snip>
checking for soci/soci.h... yes
checking for soci/soci-mysql.h... no
configure: error: cannot find soci mysql headers

Looking at the filesystem, we see:
[mmo...@foohost]$ ls -l /usr/include/soci/soci.h
-rw-r--r--. 1 root root 1432 2009-05-23 08:26 /usr/include/soci/soci.h
[mmo...@foohost]$ ls -l /usr/include/soci/soci-mysql.h 
-rw-r--r--. 1 root root 7550 2009-05-23 08:26 /usr/include/soci/soci-mysql.h


I was just wondering if anyone else ran into the problem / if it can be 
reproduced, and if there is a fix / workaround, or a better way to detect which 
soci backends are installed. Thank you greatly for any help.

-Mohammed Morsi (view my blog)



      
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to