From 04bddc625f4d749a7b6f20b751d0ad4c40384569 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sun, 20 Aug 2017 10:36:29 -0400 Subject: [PATCH] wmframepic: Use pkg-config to check for libraries. --- wmframepic/configure.ac | 3 +++ wmframepic/src/Makefile.am | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wmframepic/configure.ac b/wmframepic/configure.ac index a4308f7..5e90103 100644 --- a/wmframepic/configure.ac +++ b/wmframepic/configure.ac @@ -3,6 +3,9 @@ AC_CONFIG_SRCDIR([src/main.c]) AM_INIT_AUTOMAKE AC_PROG_CC +PKG_CHECK_MODULES([Xlib], [x11]) +PKG_CHECK_MODULES([libXpm], [xpm]) +PKG_CHECK_MODULES([argtable], [argtable2]) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT diff --git a/wmframepic/src/Makefile.am b/wmframepic/src/Makefile.am index 7e913c2..5ccbb90 100644 --- a/wmframepic/src/Makefile.am +++ b/wmframepic/src/Makefile.am @@ -11,9 +11,6 @@ draw_text.c \ arg_parser.c \ arg_parser.h -wmframepic_CPPFLAGS = -wmframepic_CFLAGS = $(X_CFLAGS) -wmframepic_LDFLAGS = $(X_LIBS) -wmframepic_LDADD = $(X_PRE_LIBS) -lX11 -lXpm -largtable2 $(X_EXTRA_LIBS) - +AM_CFLAGS = $(Xlib_CFLAGS) $(libXpm_CFLAGS) $(argtable_CFLAGS) +LIBS += $(Xlib_LIBS) $(libXpm_LIBS) $(argtable_LIBS)