On 2018-06-13, Helmut Grohne wrote: > madlib fails to cross build from source, because it abuses AC_CHECK_FILE > to search for headers. The macro is meant for searching files on the > host system. Certainly madlib won't need any headers at runtime, so you > actually want to check headers on the build system. A simple "test -e" > is suitable for that. Please consider applying the attached patch.
Tried this patch before my recent QA upload of 1.3.0-3, but was unable to successfully cross-build on amd64 for an arm64 host; the configure script got tripped up... I did switch from cdbs to dh and had to disable autoreconf, so that might need more changes to get it to cross-build... live well, vagrant > --- madlib-1.3.0.orig/configure.ac > +++ madlib-1.3.0/configure.ac > @@ -281,7 +281,7 @@ > > dnl Check for gmm++ linear solver > if test "x$enable_gmm" != "xno"; then > - AC_CHECK_FILE(${srcdir}/Contrib/gmm/gmm.h,GMM="yes") > + AS_IF([test -e "${srcdir}/Contrib/gmm/gmm.h"],[GMM="yes"]) > if test "x${GMM}" = "xyes"; then > MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_GMM_" > MAdLib_INCLUDES="${MAdLib_INCLUDES} -I\$(top_srcdir)/Contrib/gmm " > @@ -301,7 +301,7 @@ > if test "x${GMSH_PREFIX}" != "x"; then > LDFLAGS="-L${GMSH_PREFIX}/lib ${LDFLAGS}" > fi > - AC_CHECK_FILE("${GMSH_PREFIX}/include/gmsh/Gmsh.h",GMSH="yes") > + AS_IF([test -e "${GMSH_PREFIX}/include/gmsh/Gmsh.h"],[GMSH="yes"]) > dnl AC_CHECK_LIB(Gmsh,main,GMSH="yes",[],-lGmsh) > if test "x${GMSH}" = "xyes"; then > MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_GMSH_" > @@ -329,7 +329,7 @@ > if test "x${OCC_PREFIX}" != "x"; then > LDFLAGS="-L${OCC_PREFIX}/lib ${LDFLAGS}" > fi > -dnl AC_CHECK_FILE("${OCC_PREFIX}/inc/Geom_Curve.hxx",OCC="yes") > +dnl AS_IF([test -e "${OCC_PREFIX}/inc/Geom_Curve.hxx"],[OCC="yes"]) > AC_CHECK_LIB(TKernel,main,OCC="yes",[],-lTKernel) > if test "x${OCC}" = "xyes"; then > MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_OCC_" > @@ -353,7 +353,7 @@ > > dnl Check for ANN, the Approximate Nearest Neighbor library > if test "x$enable_ann" != "xno"; then > - AC_CHECK_FILE(${srcdir}/Contrib/ANN/include/ANN/ANN.h,ANN="yes") > + AS_IF([test -e "${srcdir}/Contrib/ANN/include/ANN/ANN.h"],[ANN="yes"]) > if test "x${ANN}" = "xyes"; then > MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_ANN_" > AC_DEFINE(_HAVE_ANN_) > @@ -372,7 +372,7 @@ > > dnl Check for Mathex > if test "x$enable_mathex" != "xno"; then > - AC_CHECK_FILE(${srcdir}/Contrib/mathex/mathex.h,MATHEX="yes") > + AS_IF([test -e "${srcdir}/Contrib/mathex/mathex.h"],[MATHEX="yes"]) > if test "x${MATHEX}" = "xyes"; then > MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_MATHEX_" > MAdLib_INCLUDES="${MAdLib_INCLUDES} -I\$(top_srcdir)/Contrib/mathex "
signature.asc
Description: PGP signature