Am 26.06.2013 um 08:31 schrieb Eric Wasylishen 
<ewasylis...@gmail.com<mailto:ewasylis...@gmail.com>>:

Here's a patch I'm working on that implements NSUUID using libuuid.

I'm having trouble figuring out what to put in the autoconf.ac.

Ah yes, the joyously frivolous enigma that is GNU autoconf ;-)

Does anyone know of a template I should look at?

I've looked at the configure.ac from base when I prepared the configure.ac for 
dbuskit, except for the more arcane stuff, the patterns are mostly the same 
everywhere.

I'm sure what I'm doing now isn't correct… :

+      HAVE_UUID=1
+      UUID_CFLAGS=`pkg-config --cflags uuid`
+      UUID_LIBS=`pkg-config --libs uuid`

I think it will have the right effect, but I'd replace the above three lines 
with the following:

if test $PKGCONFIG = yes; then
PKG_CHECK_MODULES(UUID, uuid, HAVE_UUID=1, HAVE_UUID=0)
else
# do AC_CHECK_HEADERS and AC_CHECK_LIBS stuff and set UUID_CFLAGS and UUID_LIBS 
manually
fi

+      CPPFLAGS="$CPPFLAGS $UUID_CFLAGS"
+      INCLUDE_FLAGS="$INCLUDE_FLAGS $UUID_CFLAGS"
+      LIBS="$UUID_LIBS $LIBS"
+      LDFLAGS="$LDFLAGS $UUID_LIBS"
+      LDIR_FLAGS="$LDIR_FLAGS $UUID_LIBS"

I'll also need to add a regular AC_CHECK_LIBS check if pkg-config isn't present.

I'd just adapt one of the existing AC_CHECK_HEADERS/AC_CHECK_LIBS checks from 
base.

Cheers,

Niels
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to