On Sat, Jul 18, 2009 at 1:45 PM, Rishi Agrawal<rishi.b.agrawal@xxxxxxxxx> wrote: > > > On Sat, Jul 18, 2009 at 1:05 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote: >> >> On Sat, Jul 18, 2009 at 9:48 AM, Rishi Agrawal<rishi.b.agrawal@xxxxxxxxx> >> wrote: >> > >> > >> > On Fri, Jul 17, 2009 at 7:22 PM, Manish Katiyar <mkatiyar@xxxxxxxxx> >> > wrote: >> >> >> >> On Fri, Jul 17, 2009 at 10:34 PM, Rishi >> >> Agrawal<rishi.b.agrawal@xxxxxxxxx> wrote: >> >> > >> >> > >> >> > On Fri, Jul 17, 2009 at 12:40 PM, Rishi Agrawal >> >> > <rishi.b.agrawal@xxxxxxxxx> >> >> > wrote: >> >> >> >> >> >> >> >> >> On Fri, Jul 17, 2009 at 12:27 PM, Mulyadi Santosa >> >> >> <mulyadi.santosa@xxxxxxxxx> wrote: >> >> >>> >> >> >>> On 7/17/09, Rishi Agrawal <rishi.b.agrawal@xxxxxxxxx> wrote: >> >> >>> > Is autoconfigure the only way to find this out.?? >> >> >>> > >> >> >>> > On Wed, Jul 15, 2009 at 6:52 AM, Pei Lin <telent997@xxxxxxxxx> >> >> >>> > wrote: >> >> >>> >> >> >>> Please don't do top posting... >> >> >>> >> >> >>> Although it's OOT, I can help a bit. IMO, you can directly check >> >> >>> /usr/lib or parse /etc/ld.so.conf and so on to find the related DSO >> >> >>> and header files. However, doing that will require more time and >> >> >>> probably not portable across system, in fact it's kinda reinventing >> >> >>> the wheel. >> >> >>> >> >> >>> So, I personally suggest to adopt autoconfigure. >> >> >>> >> >> >>> -- >> >> >>> regards, >> >> >>> >> >> >>> Mulyadi Santosa >> >> >>> Freelance Linux trainer >> >> >>> blog: the-hydra.blogspot.com >> >> >> >> >> >> >> >> >> I will have a detailed look at the autoconfigure utility and see. >> >> >> >> >> >> Thanks for all the help. >> >> >> >> >> >> -- >> >> >> Regards, >> >> >> Rishi B. Agrawal >> >> >> http://www.linkedin.com/in/rishibagrawal >> >> >> http://code.google.com/p/fscops/ >> >> > >> >> > >> >> > I have used it and it is working very good. >> >> > >> >> > I wanted to know that >> >> > >> >> > How to check the presence of libxml2 library using autoconfigure ? >> >> >> >> First link in google. >> >> >> >> >> >> >> >> http://www.kdevelop.org/index.html?filename=3.0/doc/tutorial_autoconf.html >> >> >> >> Thanks - >> >> Manish >> >> >> >> > >> >> > >> >> > -- >> >> > Regards, >> >> > Rishi B. Agrawal >> >> > http://www.linkedin.com/in/rishibagrawal >> >> > http://code.google.com/p/fscops/ >> >> > >> >> >> >> >> >> >> >> -- >> >> Thanks - >> >> Manish >> > >> > Actually I tried using that information earlier but somehow it did not >> > work. >> >> Can you please tell us a little more why it didn't work ? Any errors >> or anything else ?? >> >> > >> > Currently I am using a macro which checks wether a function is present >> > in >> > the mentioned library. >> >> I didn't understand this ? are you using something like nm ?? >> >> > >> > like printf can be checked in libc >> > >> > I used a function "xmlParsefile" and "libxml2" library and this works >> > fine. >> > The logic behind this is that when the function is present in the >> > library >> > then the library is also present on the system (is it correct ??) >> >> Should be... but by any chance are you relying the library to be >> present in a particular path ?? If that's the case it is not going to >> work anywhere ? >> >> Thanks - >> Manish >> >> > >> > >> > >> > >> > >> > >> > -- >> > Regards, >> > Rishi B. Agrawal >> > http://www.linkedin.com/in/rishibagrawal >> > http://code.google.com/p/fscops/ >> > >> >> >> >> -- >> Thanks - >> Manish > > I am using this particular line: > > AC_CHECK_LIB(xml2,xmlParseFile,,AC_MSG_ERROR(oops! no function xmlParseFile > function in xml?!?),) in my configure.in for autoconf You can try something like below too ... it doesn't depend on any particular function. /tmp/test> ./configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for -pkg-config... no checking for pkg-config... /usr/bin/pkg-config checking for libxml2... yes configure: creating ./config.status /tmp/test> cat configure.ac # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) AC_INIT(["Sample test package"], ["1.1.0"], ["mkatiyar@xxxxxxxxx"]) AC_CONFIG_SRCDIR([a.c]) AC_PROG_CC AC_PATH_PROGS([PACKAGE_CONFIG], [$host_alias-pkg-config pkg-config], [none]) if test "x$PACKAGE_CONFIG" = "xnone"; then AC_MSG_ERROR([*** pkg-config, needed to check for libxml2 existence has not been found.]) fi AC_MSG_CHECKING(for libxml2) if $PACKAGE_CONFIG libxml-2.0 --libs > /dev/null 2>&1; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_OUTPUT ===================================== Thanks - Manish > > The use of macro is > > AC_CHECK_LIB : Checks whether a function exists in the given library > (library names without the leading lib, e.g., for libxml, use just xml here) > > It seems that it is not path dependant. > -- > Regards, > Rishi B. Agrawal > http://www.linkedin.com/in/rishibagrawal > http://code.google.com/p/fscops/ > -- Thanks - Manish -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ