summaryrefslogtreecommitdiff
path: root/devel/apr/patches/patch-aa
blob: fa462c9273df874f3bdadfdf44389d9b55515eb5 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-aa,v 1.1 2003/05/30 10:14:22 epg Exp $

--- apr/apr-config.in.orig	Mon Apr 21 09:21:59 2003
+++ apr/apr-config.in
@@ -143,12 +143,17 @@ if test "$tmpbindir" = "$thisdir"; then
   location=installed
 elif test "$APR_SOURCE_DIR" = "$thisdir"; then
   location=source
+elif echo "$thisdir" | grep buildlink > /dev/null 2>&1; then
+  location=buildlink
+  BUILDLINK_DIR="`dirname $thisdir`"
 else
   location=build
 fi
 
 if test "$location" = "installed"; then
     LA_FILE="$libdir/lib${APR_LIBNAME}.la"
+elif test "$location" = "buildlink"; then
+    LA_FILE="$BUILDLINK_DIR/lib/lib${APR_LIBNAME}.la"
 else
     LA_FILE="$thisdir/lib${APR_LIBNAME}.la"
 fi
@@ -180,6 +185,8 @@ while test $# -gt 0; do
         flags="$includedir"
     elif test "$location" = "source"; then
         flags="$APR_SOURCE_DIR/include"
+    elif test "$location" = "buildlink"; then
+        flags="$BUILDLINK_DIR/include/apr-${APR_MAJOR_VERSION}"
     else
         # this is for VPATH builds
         flags="$thisdir/include $APR_SOURCE_DIR/include"
@@ -212,6 +219,8 @@ while test $# -gt 0; do
         flags="$flags -I$includedir $EXTRA_INCLUDES"
     elif test "$location" = "source"; then
         flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+    elif test "$location" = "buildlink"; then
+        flags="$flags -I$BUILDLINK_DIR/include/apr-${APR_MAJOR_VERSION} $EXTRA_INCLUDES"
     else
         # this is for VPATH builds
         flags="$flags -I$thisdir/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
@@ -222,7 +231,7 @@ while test $# -gt 0; do
     exit 0
     ;;
     --installbuilddir)
-    if test "$location" = "installed"; then
+    if test "$location" = "installed" || test "$location" = "buildlink"; then
         echo "${installbuilddir}"
     elif test "$location" = "source"; then
         echo "$APR_SOURCE_DIR/build"