summaryrefslogtreecommitdiffstats
path: root/38.patch
blob: e6197f2dbd074981a270e541470890e811d0ea8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From a5ca783eb121e2e467d70e576dda75dcba5f8ba7 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 4 Sep 2018 09:52:04 +0200
Subject: [PATCH] fix libraries link order

---
 config.m4 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.m4 b/config.m4
index da00fea..e00bfdb 100644
--- a/config.m4
+++ b/config.m4
@@ -34,16 +34,16 @@ if test "$PHP_FANN" != "no"; then
 
   LIBNAME=fann
   LIBSYMBOL=fann_set_user_data
+  PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $FANN_DIR/$PHP_LIBDIR, FANN_SHARED_LIBADD)
+  PHP_ADD_LIBRARY(m)
 
   PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
   [
-    PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $FANN_DIR/$PHP_LIBDIR, FANN_SHARED_LIBADD)
-    AC_CHECK_LIB($LIBNAME,[fann_copy],[ AC_DEFINE(HAVE_FANN_2_2,1,[Fann library version 2.2]) ],[],[-lm])
+    AC_CHECK_LIB($LIBNAME,[fann_copy],[ AC_DEFINE(HAVE_FANN_2_2,1,[Fann library version 2.2]) ],[],[])
     AC_DEFINE(HAVE_FANN,1,[Fann library found])
   ],[
     AC_MSG_ERROR([wrong libfann version (you need at least version 2.1) or lib not found])
   ],[
-    -L$FANN_DIR/$PHP_LIBDIR -lm
   ])
 
   PHP_SUBST(FANN_SHARED_LIBADD)