build: use pkgconfig to determine libuuid's parameters

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
This commit is contained in:
Jan Engelhardt 2012-12-12 03:53:28 +01:00
parent b1bce4d3b7
commit fe2928a793
2 changed files with 3 additions and 5 deletions

View File

@ -47,10 +47,7 @@ AC_CHECK_HEADERS_ONCE([
AC_PROG_CC AC_PROG_CC
# Checks for libraries. # Checks for libraries.
AC_CHECK_LIB([uuid], [uuid_generate], PKG_CHECK_MODULES([libuuid], [uuid])
[AC_DEFINE([HAVE_LIBUUID], 1,
[Define to 1 if you have the 'uuid' library (-luuid).])],
[AC_MSG_ERROR([UUID library not found])])
# Checks for header files. # Checks for header files.
AC_CHECK_HEADERS([fcntl.h mntent.h stdlib.h string.h \ AC_CHECK_HEADERS([fcntl.h mntent.h stdlib.h string.h \

View File

@ -1,6 +1,7 @@
## Makefile.am ## Makefile.am
AM_CPPFLAGS = ${libuuid_CFLAGS}
AM_CFLAGS = -Wall AM_CFLAGS = -Wall
LDADD = -luuid
bin_PROGRAMS = mkfs.f2fs bin_PROGRAMS = mkfs.f2fs
mkfs_f2fs_SOURCES = f2fs_format.c f2fs_format.h mkfs_f2fs_SOURCES = f2fs_format.c f2fs_format.h
mkfs_f2fs_LDADD = ${libuuid_LIBS}