Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace AC_RUN_IFELSE usage with AC_COMPILE_IFELSE #475

Closed
sandrotosi opened this issue Jan 19, 2018 · 2 comments
Closed

replace AC_RUN_IFELSE usage with AC_COMPILE_IFELSE #475

sandrotosi opened this issue Jan 19, 2018 · 2 comments

Comments

@sandrotosi
Copy link

Hello,
this was reported in Debian as http://bugs.debian.org/885151:

transmission fails to cross build from source, because it uses
AC_RUN_IFELSE. Fortunately, the use is unnecessary and can simply be
filled with AC_COMPILE_IFELSE. The attached patch implements that.

Index: transmission-2.92/configure.ac
===================================================================
--- transmission-2.92.orig/configure.ac
+++ transmission-2.92/configure.ac
@@ -386,14 +386,12 @@
 dnl MINIUPNPC_API_VERSION and we won't have to figure
 dnl it out on our own
 if test "x$upnp_version" = "xunknown" ; then
-  AC_RUN_IFELSE(
+  AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM(
       [#include <stdlib.h>
        #include <miniupnpc/miniupnpc.h>],
-      [#ifdef MINIUPNPC_API_VERSION
-       return EXIT_SUCCESS;
-       #else
-       return EXIT_FAILURE;
+      [#ifndef MINIUPNPC_API_VERSION
+       #error MINIUPNPC_API_VERSION undefined
        #endif]
     )],
     [upnp_version=">= 1.7"]

would you consider merging it?

thanks,
Sandro

@mikedld mikedld added this to the 3.00 milestone Jan 25, 2018
@mikedld
Copy link
Member

mikedld commented Jan 26, 2018

Thanks!

@mikedld mikedld modified the milestones: 3.00, 2.94 Apr 6, 2018
@bkuhls
Copy link
Contributor

bkuhls commented May 2, 2018

This PR fixed https://trac.transmissionbt.com/ticket/6140, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants