Hi,

I have fixed the ecl package for NixOS and had to add a configure option
for libffi-prefix.  Would it be possible to commit this change into the
ecl sources so that no extra patch is required when a "custom" libffi
prefix is needed?

Thank you,

Tomas

>From ed5f8f0ffa07d4333e7c90bea61bc2dc030e930a Mon Sep 17 00:00:00 2001
From: Tomas Hlavaty <t...@logand.com>
Date: Sat, 28 Mar 2015 00:29:45 +0100
Subject: [PATCH] add configure option libffi-prefix

similar to gmp-prefix;  useful on nixos for example
---
 src/configure.in | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/configure.in b/src/configure.in
index 434da49..642c66c 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -191,6 +191,11 @@ AC_ARG_WITH(dffi,
                   [(system|included|auto|no, default=AUTO if libffi available)]),
   [enable_libffi=${withval}], [enable_libffi=auto])
 
+AC_ARG_WITH(libffi-prefix,
+  AS_HELP_STRING( [--with-libffi-prefix=path],
+                  [prefix for system LIBFFI includes and libraries] ),
+  [LIBFFI_INCDIR="$withval/include"; LIBFFI_LIBDIR="$withval/lib"], [])
+
 AC_ARG_WITH(fpe,
   AS_HELP_STRING( [--with-fpe],
                   [detect floating point exceptions]
@@ -368,6 +373,22 @@ else
   INFOEXT=info
 fi
 
+dnl libffi
+
+if test "x$LIBFFI_INCDIR" != "x"; then
+  LIBFFI_CPPFLAGS="-I$LIBFFI_INCDIR"
+fi
+if test "x$LIBFFI_LIBDIR" != "x"; then
+  LIBFFI_LDFLAGS="-L$LIBFFI_LIBDIR"
+  if test "$enable_rpath" = "yes"; then
+    if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then
+      LIBFFI_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$LIBFFI_LIBDIR,"`" $LIBFFI_LDFLAGS"
+    fi
+  fi
+fi
+CPPFLAGS="$CPPFLAGS $LIBFFI_CPPFLAGS"
+LDFLAGS="$LDFLAGS $LIBFFI_LDFLAGS"
+
 dnl ======================================================================
 dnl GNU multiprecision library
 dnl
-- 
2.1.4

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to