1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

use pkg-config to check libuuid deps if available

Newer versions of these packages ship with pkg-config files, so if we can
detect it via those, do so.  If that fails, fall back to the old methods.

Also add a configure flag to explicitly control its usage.
This commit is contained in:
Mike Frysinger 2014-10-27 14:55:22 -04:00 committed by Giuseppe Scrivano
parent 297d040ce1
commit d272339fda
2 changed files with 28 additions and 13 deletions

View File

@ -3,6 +3,9 @@
* configure.ac: Use pkg-config to check for zlib presence and
fallback to the previous code if that doesn't work.
* configure.ac: Use pkg-config to check for libuuid presence and
fallback to the previous code if that doesn't work.
2014-07-28 Ángel González <keisial@gmail.com>
* contrib: Created contrib folder.
* contrib/tsocked-wget: Added wrapper for usage with socks proxy.

View File

@ -569,20 +569,32 @@ fi
dnl
dnl Check for UUID
dnl
AC_CHECK_HEADER(uuid.h,
AC_CHECK_FUNC(uuid, uuid_create,
[AC_DEFINE([HAVE_UUID_CREATE], 1,
[Define if uuid_create is available.])
])
)
AC_CHECK_HEADER(uuid/uuid.h,
AC_CHECK_LIB(uuid, uuid_generate,
[LIBS="${LIBS} -luuid"
AC_DEFINE([HAVE_LIBUUID], 1,
[Define if libuuid is available.])
])
)
AC_ARG_WITH(libuuid, AC_HELP_STRING([--without-libuuid],
[Generate UUIDs for WARC files via libuuid]))
AS_IF([test "X$with_libuuid" != "Xno"],[
PKG_CHECK_MODULES([UUID], uuid, [
LIBS="$UUID_LIBS $LIBS"
CFLAGS="$UUID_CFLAGS $CFLAGS"
AC_DEFINE([HAVE_LIBUUID], [1], [Define if using libuuid.])
], [
AC_CHECK_HEADER(uuid.h,
AC_CHECK_FUNC(uuid, uuid_create,
[AC_DEFINE([HAVE_UUID_CREATE], 1,
[Define if uuid_create is available.])
])
)
AC_CHECK_HEADER(uuid/uuid.h,
AC_CHECK_LIB(uuid, uuid_generate,
[LIBS="${LIBS} -luuid"
AC_DEFINE([HAVE_LIBUUID], 1,
[Define if libuuid is available.])
])
)
])
])
dnl
dnl Check for PCRE