I just pushed a libmemcached.m4 into my branch - Brian should be merging
soon (I hope)
It has a macro AC_WITH_LIBMEMCACHED which you can use in your plugin file.
The macro will set ac_cv_have_memcached to yes if all is good. It also
defines an Automake conditional HAVE_MEMCACHED that you can use in your
makefile.
AND - it puts the flags into LIBMEMCACHED_CPPFLAGS and the
LIBMEMCACHED_LIBS.
So in your Makefile.am, you'll want to add something like:
AM_CPPFLAGS = ${GLOBAL_CPPFLAGS} ${LIBMEMCACHED_CPPFLAGS}
LDADD = ${LIBMEMCACHED_LIBS}
Monty
Patrick Galbraith wrote:
> Toru,
>
> I have the rough beginnings of coding the Memcached UDFs to the new UDF
> API. Right now, it seems I'm stuck with the link. The link doesn't
> resolve the libmemcached library. So, I guess I need some help with the
> plug.in and/or autoconf setup. If you could take a peak at what I did to
> use the snippit you included for the plug.in, etc, I'd be glad for any
> advice. My tree:
>
> lp:~patg-patg/drizzle/drizzle_memcached
>
>
> Thanks much!
>
> Patrick
>
> Toru Maesaka wrote:
>> G'day guys,
>>
>> So for checking libmemcached, I added this in my plug.in
>> <http://plug.in>:
>>
>> DRIZZLE_PLUGIN_ACTIONS(query_cache, [
>> AC_CHECK_HEADERS(libmemcached/memcached.h)
>> AM_CONDITIONAL(BUILD_QCACHE_MEMD,[test
>> "$ac_cv_header_libmemcached_memcached_h" = "yes"])
>> AS_IF([test "$ac_cv_header_libmemcached_memcached_h" = "no"],
>> [AC_MSG_WARN([Couldn't find libmemcached headers, query_cache will
>> not be built])])
>> ])
>>
>> which means we can wrap the content of Makefile.am with
>> BUILD_QCACHE_MEMD:
>>
>> if BUILD_QCACHE_MEMD
>> <content>
>> endif
>>
>> :)
>>
>> Speaking of - although normally plugins require all of their files to be
>> in the plugin directory, I think it might be nice in this case if we
>> stick the find-libmemcached autoconf macro in the m4 dir, so that each
>> plugin can AC_REQUIRE() it so we don't wind up checking for it twice. We
>> should probably also do this with the openssl m4 stuff too.
>>
>> +1
>>
>> Cheers,
>> Toru
>>
>>
>> On Wed, Nov 5, 2008 at 3:28 AM, Patrick Galbraith <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>> Hi,
>>
>> I need to go through with you guys the conversion from existing
>> UDF API to new API. It looks like it *might* be simple. I hope.
>>
>> --Patrick
>>
>>
>> Toru Maesaka wrote:
>>
>> The plugin that I'm working on won't build if libmemcached isn't
>> found. I based this off the md5 plugin.
>>
>> I'm away from my computer so I can't paste anything but I'll
>> get back
>> to this if it hasn't been resolved next I have my computer.
>>
>> Cheers,
>> Toru
>>
>>
>> On 11/4/08, Brian Aker <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>> Hi!
>>
>> On Nov 4, 2008, at 6:37 PM, Patrick Galbraith wrote:
>>
>>
>> I would also need something to abstain from building
>> the UDF if
>> libmemcached is not installed.
>>
>> I am happy to see them included as a plugin in the tree,
>> but we need a
>> way to not build them if libmemcached is not found.
>>
>> Cheers,
>> -Brian
>>
>> --
>> _______________________________________________________
>> Brian "Krow" Aker, brian at tangent.org <http://tangent.org>
>> Seattle, Washington
>> http://krow.net/ <-- Me
>> http://tangent.org/ <-- Software
>> _______________________________________________________
>> You can't grep a dead tree.
>>
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~drizzle-discuss
>> <https://launchpad.net/%7Edrizzle-discuss>
>> Post to : [email protected]
>> <mailto:[email protected]>
>> Unsubscribe : https://launchpad.net/~drizzle-discuss
>> <https://launchpad.net/%7Edrizzle-discuss>
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help : https://help.launchpad.net/ListHelp
>
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp