curl-users
Re: Need help in using libcurl.m4
Date: Thu, 15 Apr 2010 23:48:56 +0200 (CEST)
On Thu, 15 Apr 2010, Amit Kumar wrote:
First, we libcurl users/hackers tend to hang out on the curl-library list, so
we should take this and further libcurl related issue over to that list
instead...
Next, I would recommend you to use AM_CONFIG_HEADER([config.h]) or similar, to
generate a header file from the configure run. If you do this, you want to run
autoheader too (that creates a config.h.in template).
> Do I need to copy the libcurl.m4 file somewhere in my application directory?
Yes you do. aclocal + autoconf will make us of it then when you use the
LIBCURL_CHECK_CONFIG function.
> What am I missing? Please guide me.
You should note that LIBCURL_CHECK_CONFIG doesn't store the info about where
libcurl is found, so when you write your link option in Makefile.am you can't
use a path from the configure run.
It seems like a room for improvement of the libcurl.m4 function, in case
someone would feel bored enough some day! ;-)
I made a test app just now work fine with two created files like this:
---- configure.ac ----
AC_INIT(curl-app, 1.0, bugreport_at_example.com)
AM_INIT_AUTOMAKE(curl-app, 1.0)
AC_CONFIG_SRCDIR([curl-app.c])
AM_CONFIG_HEADER([config.h])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
LIBCURL_CHECK_CONFIG
AC_OUTPUT( Makefile )
---- end of it ----
---- Makefile.am ----
bin_PROGRAMS = curl-app
curl_app_LDFLAGS=-lcurl
curl_app_SOURCES = curl-app.c
---- end of it ----
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-04-15