build-sys: link with libgsf optionnally

This commit is contained in:
Marc-André Lureau
2013-02-19 23:39:40 +01:00
parent 7485a6b7a4
commit 24c95a1338
3 changed files with 19 additions and 2 deletions

View File

@ -68,6 +68,20 @@ AC_CHECK_LIB(
[DL_LIBS="-ldl"]
)
AC_ARG_WITH([gsf],
AS_HELP_STRING([--without-gsf], [Ignore presence of libgsf and disable it])
)
AS_IF([test "x$with_gsf" != "xno"],
[PKG_CHECK_MODULES([GSF], [libgsf-1], [have_gsf=yes], [have_gsf=no])],
[have_gsf=no]
)
AS_IF([test "x$have_gsf" = "xyes"],
[AC_DEFINE([WITH_GSF], 1, [Have libgsf?])],
[AS_IF([test "x$with_gsf" = "xyes"],
[AC_MSG_ERROR([libgsf requested but not found])])]
)
PKG_CHECK_MODULES(
[OPENSSL],
[libcrypto >= 0.9.8],