summaryrefslogtreecommitdiffstats
path: root/ip2proxy-bundledlib.patch
blob: 6f53f26a10317d85ab91438ea2a503aa72837ef2 (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
diff -up ./config.m4.rpm ./config.m4
--- ./config.m4.rpm	2020-10-22 10:42:41.698002764 +0200
+++ ./config.m4	2020-10-22 10:53:11.200722296 +0200
@@ -8,6 +8,16 @@ dnl Make sure that the comment is aligne
 
 if test "$PHP_IP2PROXY" != "no"; then
 
+ if [ test -r $PHP_IP2PROXY/IP2Proxy.c ]; then
+   # use bunbled library
+   PHP_ADD_INCLUDE($PHP_IP2PROXY)
+   PHP_ADD_BUILD_DIR($PHP_IP2PROXY)
+
+   PHP_ADD_LIBRARY(rt, 1, IP2PROXY_SHARED_LIBADD)
+
+   PHP_SUBST(IP2PROXY_SHARED_LIBADD)
+   PHP_NEW_EXTENSION(ip2proxy, ip2proxy.c $PHP_IP2PROXY/IP2Proxy.c, $ext_shared)
+ else
   # --with-ip2proxy -> check with-path
   SEARCH_PATH="/usr/local /usr /opt/local"
   SEARCH_FOR="/include/IP2Proxy.h"
@@ -63,5 +73,6 @@ if test "$PHP_IP2PROXY" != "no"; then
   PHP_SUBST(IP2PROXY_SHARED_LIBADD)
 
   PHP_NEW_EXTENSION(ip2proxy, ip2proxy.c, $ext_shared)
+ fi
 fi