1
0
forked from pool/gap-float
gap-float/incl.diff

80 lines
2.4 KiB
Diff
Raw Normal View History

From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-06-18 19:13:44.267333132 +0200
The project builds C++ files, but _CFLAGS only applies to .c files.
The flags must go into _CPPFLAGS for all languages' preprocessor.
---
m4/ac_check_cxsc.m4 | 12 ++++++------
src/Makefile.am | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
Index: float-0.5.18/m4/ac_check_cxsc.m4
===================================================================
--- float-0.5.18.orig/m4/ac_check_cxsc.m4
+++ float-0.5.18/m4/ac_check_cxsc.m4
@@ -1,5 +1,5 @@
# check for cxsc library
-# sets CXSC_CFLAGS, CXSC_LDFLAGS, CXSC_MAKELIB and CXSC_LIBS,
+# sets CXSC_CPPFLAGS, CXSC_LDFLAGS, CXSC_MAKELIB and CXSC_LIBS,
# and CXSC_WITH, CXSC_DEPEND,
# and CXSC=yes/no/extern
@@ -28,7 +28,7 @@ AC_ARG_WITH(cxsc,
else
CXSC_WITH="$CXSC_WITH --with-cxsc=$withval"
CXSC=yes
- CXSC_CFLAGS="-I$withval/include"; CXSC_LDFLAGS="-L$withval/lib"
+ CXSC_CPPFLAGS="-I$withval/include"; CXSC_LDFLAGS="-L$withval/lib"
fi]
)
@@ -37,7 +37,7 @@ AC_ARG_WITH(cxsc-include,
Location at which the cxsc include files were installed.],
[CXSC=yes
CXSC_WITH="$CXSC_WITH --with-cxsc-include=$withval"
- CXSC_CFLAGS="-I$withval"]
+ CXSC_CPPFLAGS="-I$withval"]
)
AC_ARG_WITH(cxsc-lib,
@@ -57,7 +57,7 @@ if test "$CXSC" != extern; then
AC_LANG_PUSH([C++])
temp_status=true
-CPPFLAGS="$CPPFLAGS $CXSC_CFLAGS"
+CPPFLAGS="$CPPFLAGS $CXSC_CPPFLAGS"
AC_CHECK_HEADER(real.hpp,,[temp_status=false])
LDFLAGS="$LDFLAGS $CXSC_LDFLAGS"
AC_CHECK_LIB(cxsc,z_zadd,,[temp_status=false])
@@ -93,7 +93,7 @@ CXSC_MAKELIB=`printf 'cxsc: $(CXSCLIB).t
fi\n'`
MAKE_LIBTARGETS="$MAKE_LIBTARGETS cxsc"
-CXSC_CFLAGS='-I$(EXTERN)/include'
+CXSC_CPPFLAGS='-I$(EXTERN)/include'
CXSC_LDFLAGS='-L$(EXTERN)/lib'
CXSC_WITH='--with-cxsc=$(EXTERN)'
@@ -110,7 +110,7 @@ LIBS="$temp_LIBS"
if test "$CXSC" != no; then
AC_DEFINE([USE_CXSC],1,[use CXSC library])
fi
-AC_SUBST(CXSC_CFLAGS)
+AC_SUBST([CXSC_CPPFLAGS])
AC_SUBST(CXSC_LDFLAGS)
AC_SUBST(CXSC_LIBS)
AC_SUBST(CXSC_MAKELIB)
Index: float-0.5.18/src/Makefile.am
===================================================================
--- float-0.5.18.orig/src/Makefile.am
+++ float-0.5.18/src/Makefile.am
@@ -44,7 +44,7 @@ endif ## WITH_MPFR_IS_YES
if WITH_CXSC_IS_YES
float_la_SOURCES += cxsc.C cxsc_poly.C
-float_la_CFLAGS += $(CXSC_CFLAGS)
+float_la_CPPFLAGS += $(CXSC_CPPFLAGS)
float_la_LDFLAGS += $(CXSC_LDFLAGS)
float_la_LIBADD += $(CXSC_LIBS)
endif