diff options
author | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2009-05-16 01:01:39 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-08-03 20:34:02 -0700 |
commit | 45720a2e266748ac15bc0544b56e035383695588 (patch) | |
tree | 002e8ce7f96a3170748297a02ecda978e6bb1ee0 /configure.ac | |
parent | 0389dbec3b738fa7e1dbef2b5317124b95bdfb20 (diff) |
Use FreeBSD uuid functions when available.
If the system provide the uuid_create function assume building on FreeBSD
or another OS with a compatible uuid interface. If that's the case, ignore
libuuid and just use the system functions without extra deps.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 9730b70..cf36193 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,15 @@ XTRANS_CONNECTION_FLAGS AC_ARG_WITH(libuuid, AC_HELP_STRING([--with-libuuid], [Build with libuuid support for client IDs])) -if test x"$with_libuuid" != xno; then - PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no]) -fi -if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then - AC_MSG_ERROR([requested libuuid support but uuid.pc not found]) -fi +AC_CHECK_FUNCS([uuid_create], [], [ + if test x"$with_libuuid" != xno && test x"$have_system_uuid" != xyes; then + PKG_CHECK_MODULES(LIBUUID, uuid, [HAVE_LIBUUID=yes], [HAVE_LIBUUID=no]) + fi + if test x"$with_libuuid" = xyes && test x"$HAVE_LIBUUID" = xno; then + AC_MSG_ERROR([requested libuuid support but uuid.pc not found]) + fi +]) + AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes) XORG_RELEASE_VERSION |