]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
configure: fix static link with popt 18/head
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 29 Nov 2014 16:24:02 +0000 (17:24 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 29 Nov 2014 16:24:02 +0000 (17:24 +0100)
Use pkg-config to find the popt library.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac

index 8a7428872cd26108917b0114cb6d6975cd0b551d..2289efb5481ecf97d5255ca4fc24b6eab2be359f 100644 (file)
@@ -31,7 +31,10 @@ fi
 AC_CHECK_LIB([daemon],[daemon_log], , AC_MSG_ERROR(libdaemon needed))
 AC_CHECK_LIB([pthread],[pthread_create], , AC_MSG_ERROR(pthread library needed))
 AC_CHECK_LIB([m],[exp], , AC_MSG_ERROR(maths library needed))
-AC_CHECK_LIB([popt],[poptGetContext], , AC_MSG_ERROR(libpopt needed))
+PKG_CHECK_MODULES(
+    [POPT], [popt],
+    [LIBS="${POPT_LIBS} ${LIBS}"
+     AC_DEFINE([HAVE_LIBPOPT],[1],[Define to 1 if you have popt])])
 
 # Look for piddir flag
 AC_ARG_WITH(piddir, [ --with-piddir=<pathname> Specify a pathname to a directory in which to write the PID file.], [