0.15.1 Draconian autoconf behavior
Stef Walter
stefw at redhat.com
Thu Feb 7 10:14:28 PST 2013
On 02/07/2013 02:57 PM, Andreas Metzler wrote:
> On 2013-02-05 Stef Walter <stefw at redhat.com> wrote:
>> On 02/05/2013 07:17 PM, Andreas Metzler wrote:
> [...]
>>> Is it intended behavior that setting two autoconf options is required for
>>> building p11-kit without libtasn1?
>
>> No. But what is intended that most packagers do not treat this as an
>> optional dependency. libtasn1 is an optional dependency for places like
>> building on win32 and such.
> [...]
>> But I still would like to fail when libtasn1 is not available and
>> --without-libtasn1 is not specified.
> [...]
>
> I think the attached patch improves things, while still implentig your
> wishes.
Thanks! Just have a question below:
diff --git a/configure.ac b/configure.ac
index 67bf5de..82e26b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,7 +58,6 @@ AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AC_C_BIGENDIAN
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
Why is this line gone?
-if test "$with_libtasn1" != "no"; then
- PKG_CHECK_MODULES(LIBTASN1, libtasn1 >= 2.14)
+AS_IF([test "x$with_libtasn1" != "xno"], [
+ PKG_CHECK_MODULES([LIBTASN1], [libtasn1 >= 2.14],
+ [with_libtasn1="yes"],
+ [AC_MSG_ERROR([libtasn1 not found, building without it is not
recommend and causes a loss of functionality. Specify --without-libtasn1
to force building without.])
+ with_libtasn1="no"
+ ])
AC_SUBST(LIBTASN1_CFLAGS)
AC_SUBST(LIBTASN1_LIBS)
- with_libtasn1="yes"
We use this line for status, and in the AM_CONDITIONAL. Any reason for
taking it out? Isn't this variable empty of --with-libtasn1 is not
specified (the default)?
Cheers,
Stef
More information about the p11-glue
mailing list