autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems updating configure.in


From: Eamon Millman
Subject: problems updating configure.in
Date: Wed, 8 Sep 2004 14:14:55 -0400

Greetings,

 

            I hope this is the right place to as my question, if not
please let me know. I am currently contributing to an open source
project (xCHM) and my modifications require me to make some changes in
the configure.in to detect and support an additional library. I am not
an experienced linux developer by any measure, I've worked in windows
for a few years but linux just popped up a few weeks go, so perhaps this
is a rather silly mistake; either way it's driving me nuts.

 

            I am adding support for the XmlRpc++ library which is a C++
library using namespaces. This means, from what I've read, that I cannot
simply use AC_CHECK_LIB() in my configure.in file. I've written a new
test that uses the AC_TRY_LINK() macro and it seems to detect the
presence of the library I want just fine. In addition to the detection
of the library I also need to set a preprocessor define so that the
optional code is compiled into the project, and make sure that the
required library is added to the ld arguments.

 

The issue arises when I then go to run make after I've run configure.
Something is messed up and it re-runs configure with the flags I
originally used. I have only modified the configure.in file, should I be
making additional modifications in other files as well? I don't
experience any problems if I don't use the --enable-xmlrpc flag.

 

This is the added code to the configure.in

 

AC_ARG_ENABLE(xmlrpc,

                  [  --enable-xmlrpc         Enable XmlRpc functionality
in xchm.],

 

                  [ enable_xmlrpc=yes ])

 

if test "x$enable_xmlrpc" = "xyes" ; then

            AC_LANG_PUSH(C++)

            AC_CHECK_HEADERS(XmlRpc.h,,

              AC_MSG_ERROR([Can't find the XmlRpc++ header.]))

 

            LIBS="$LIBS -lXmlRpc"  

            AC_TRY_LINK([#include<XmlRpc.h> ],

                        [XmlRpc::XmlRpcServer svr;], 

                        AC_DEFINE([WITH_LIBXMLRPC],1,[Build with XmlRpc
support.]),

              AC_MSG_ERROR([Can't find/use -lXmlRpc. Please install
XmlRpc++ first.])

              )

            AC_LANG_POP()

fi

 

 

Eamon Millman

Intern PCI Geomatics

3rd Year Computer Engineering University of Victoria

 

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]