X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=configure.ac;h=fd1ac814c6b601a8cdf9eca3ec7f980e10a22dd1;hb=4817cd5b305ff6d3153e97ba584ecd363832714c;hp=e9958cf2ab3e3a72f828e77314a1e3e13f8b8fc7;hpb=05c031000c447ff01c8f23e1d0b5455a18b8dfc2;p=babeltrace.git diff --git a/configure.ac b/configure.ac index e9958cf2..fd1ac814 100644 --- a/configure.ac +++ b/configure.ac @@ -236,9 +236,24 @@ AC_CHECK_LIB([c], [posix_fallocate], ] ) -AC_CHECK_LIB([popt], [poptGetContext], [], - [AC_MSG_ERROR([Cannot find popt.])] +# Check libpopt +PKG_CHECK_MODULES([POPT], [popt], + [ + dnl PKG_CHECK_MODULES defines POPT_LIBS + ], + [ + AC_MSG_WARN([pkg-config was unable to find a valid .pc for libpopt. Set PKG_CONFIG_PATH to specify the pkgconfig configuration file location]) + AC_MSG_WARN([Finding libpopt without pkg-config.]) + AC_CHECK_LIB([popt], + [poptGetContext], + [POPT_LIBS="-lpopt"], + [ + AC_MSG_FAILURE([Cannot find libpopt. Either set PKG_CONFIG_PATH to the configuration file location or use LDFLAGS=-Ldir to specify the library location]) + ] + ) + ] ) +AC_SUBST(POPT_LIBS) # Plugins AC_ARG_VAR([PLUGINSDIR], [built-in plugins install directory [LIBDIR/babeltrace/plugins]])