Source: parafly
Version: 0.1.0-1
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

parafly fails to cross build from source, because it misses the -fopenmp
flag during cross builds. configure.ac attempts to detect the compiler
type from the CXX variable and when using cross builds the variable is
not matched, so it ends up missing the relevant -fopenmp flag. The
author of configure.ac already figured that a better solution would be
using AC_OPENMP, but that would require the bleeding-edge autoconf 2.62.
It turns out that the macro is already 13 years old. Maybe it is time to
enable it now and fix cross builds that way?

Helmut
--- parafly-0.1.0.orig/configure.ac
+++ parafly-0.1.0/configure.ac
@@ -2,10 +2,10 @@
 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
 AC_LANG([C++])
 AC_PROG_CXX
-#AC_OPENMP # requires autoconf >= 2.62
-AC_SUBST([AM_CXXFLAGS], [])
+AC_OPENMP
+AC_SUBST([AM_CXXFLAGS], [$OPENMP_CXXFLAGS])
 case $CXX in
-  g++*) AC_SUBST([AM_CXXFLAGS],["-pedantic -fopenmp -Wall -Wextra -Wno-long-long -Wno-deprecated $AM_CXXFLAGS"]);;
+  g++*) AC_SUBST([AM_CXXFLAGS],["-pedantic -Wall -Wextra -Wno-long-long -Wno-deprecated $AM_CXXFLAGS"]);;
   sunCC*) AC_SUBST([AM_CXXFLAGS], ["-library=stlport4 -xopenmp -xvpara -fast $AM_CXXFLAGS"]) ;;
   icpc*) AC_SUBST([AM_CXXFLAGS], ["-Wall -openmp $AM_CXXFLAGS"]) ;;
 esac

Reply via email to