Source: sollya
Version: 7.0+ds-3
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

sollya fails to cross build from source, because it uses AC_RUN_IFELSE a
lot. Such tests cannot be performed during cross builds. A number of
them test whether libraries work at runtime. There is little we can do
here about during cross builds, so skipping these checks during cross
builds only seems best. Another pile checks whether the linker accepts
certain flags. Those can be converted to AC_LINK_IFELSE at no loss.
That removes the big chunk. For the remainders it would help to
introduce cache variables using AC_CACHE_CHECK such that a cross builder
could provide the expected results. Please consider applying the
attached patch.

Helmut
--- sollya-7.0+ds.orig/configure.ac
+++ sollya-7.0+ds/configure.ac
@@ -385,7 +385,8 @@
                                [[mpz_t a; mpz_init(a); mpz_clear(a); return 0;]])],
 	      [AC_MSG_RESULT(yes)],
               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([libgmp is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])])
+               AC_MSG_WARN([libgmp is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])],
+              [AC_MSG_RESULT(cross. assuming yes)])
 
 
 AC_MSG_CHECKING([if libmpfr is found at runtime])
@@ -393,7 +394,8 @@
                                [[mpfr_t a; mpfr_init2(a, 53); mpfr_clear(a); return 0;]])],
 	      [AC_MSG_RESULT(yes)],
               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([libmpfr is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])])
+               AC_MSG_WARN([libmpfr is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])],
+              [AC_MSG_RESULT(cross. assuming yes)])
 
 
 AC_MSG_CHECKING([if libmpfi is found at runtime])
@@ -401,7 +403,8 @@
                                [[mpfi_t a; mpfi_init(a); mpfi_clear(a); return 0;]])],
 	      [AC_MSG_RESULT(yes)],
               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([libmpfi is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])])
+               AC_MSG_WARN([libmpfi is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])],
+              [AC_MSG_RESULT(cross. assuming yes)])
 
 
 AC_MSG_CHECKING([if libxml2 is found at runtime])
@@ -409,7 +412,8 @@
                                [[xmlCleanupParser(); return 0;]])],
 	      [AC_MSG_RESULT(yes)],
               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([libxml2 is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])])
+               AC_MSG_WARN([libxml2 is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])],
+              [AC_MSG_RESULT(cross. assuming yes)])
 
 
 
@@ -636,7 +640,8 @@
               ],
               [AC_MSG_RESULT(yes)],
               [AC_MSG_RESULT(no)
-               AC_MSG_WARN([libfplll is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])])
+               AC_MSG_WARN([libfplll is found at compile time but not at run time. This may or may not be an issue. If it is an issue (viz. if compilation fails), try checking /etc/ld.so.conf and run ldconfig and/or check all settings concerning search paths for shared libraries.])],
+              [AC_MSG_RESULT(cross. assuming yes)])
 
 AC_LANG_POP([C++])
 
@@ -658,46 +663,46 @@
 
 LDFLAGS="$AM_LDFLAGS -Wl,--export-dynamic $USER_LDFLAGS"
 AC_MSG_CHECKING([for --export-dynamic support])
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
-                               [[exit(0);]]
-                              )],
-              [
-                 AC_MSG_RESULT(yes)
-                 AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-dynamic"
-              ],
-              [
-                 AC_MSG_RESULT(no)
-                 LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
-              ])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
+                                [[exit(0);]]
+                               )],
+               [
+                  AC_MSG_RESULT(yes)
+                  AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-dynamic"
+               ],
+               [
+                  AC_MSG_RESULT(no)
+                  LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
+               ])
 
 
 LDFLAGS="$AM_LDFLAGS -Xlinker --allow-multiple-definition $USER_LDFLAGS"
 AC_MSG_CHECKING([for -Xlinker --allow-multiple-definition support])
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
-                               [[exit(0);]]
-                              )],
-              [
-                 AC_MSG_RESULT(yes)
-                 AM_LDFLAGS="$AM_LDFLAGS -Xlinker --allow-multiple-definition"
-              ],
-              [
-                 AC_MSG_RESULT(no)
-                 LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
-              ])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
+                                [[exit(0);]]
+                               )],
+               [
+                  AC_MSG_RESULT(yes)
+                  AM_LDFLAGS="$AM_LDFLAGS -Xlinker --allow-multiple-definition"
+               ],
+               [
+                  AC_MSG_RESULT(no)
+                  LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
+               ])
 
 LDFLAGS="$AM_LDFLAGS -z muldefs $USER_LDFLAGS"
 AC_MSG_CHECKING([for -z muldefs support])
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
-                               [[exit(0);]]
-                              )],
-              [
-                 AC_MSG_RESULT(yes)
-                 AM_LDFLAGS="$AM_LDFLAGS -z muldefs"
-              ],
-              [
-                 AC_MSG_RESULT(no)
-                 LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
-              ])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
+                                [[exit(0);]]
+                               )],
+               [
+                  AC_MSG_RESULT(yes)
+                  AM_LDFLAGS="$AM_LDFLAGS -z muldefs"
+               ],
+               [
+                  AC_MSG_RESULT(no)
+                  LDFLAGS="$AM_LDFLAGS $USER_LDFLAGS"
+               ])
 
 AC_MSG_CHECKING([if compiler activates FTZ by default])
 AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]],

Reply via email to