summaryrefslogtreecommitdiff
path: root/ftp/curl/files/patch-configure
blob: 530e871c984abe6600bc70ad2ebfa2205adf295a (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Description: Tweak the build for a FreeBSD environment.
 Respect user-supplied CFLAGS
 Use the FreeBSD location of pkg-config's library directory.
 Check for librtmp in sensible locations in all cases.
Forwarded: not-needed
Author: Peter Pentchev <roam@FreeBSD.org>
Last-Update: 2010-12-19

--- configure.orig	2013-02-06 17:47:26.000000000 +0800
+++ configure	2013-02-18 18:25:16.000000000 +0800
@@ -16651,6 +16651,9 @@
     tmp_CFLAGS="$CFLAGS"
     tmp_CPPFLAGS="$CPPFLAGS"
 
+# Do not remove the user-supplied debug flags in CFLAGS
+# PR: 150854
+if false; then
     ac_var_stripped=""
   for word1 in $tmp_CFLAGS; do
     ac_var_strip_word="no"
@@ -16681,6 +16684,7 @@
   done
     tmp_CPPFLAGS="$ac_var_stripped"
   squeeze tmp_CPPFLAGS
+fi
 
     #
     if test "$want_debug" = "yes"; then
@@ -16898,6 +16902,9 @@
     #
     if test "$honor_optimize_option" = "yes"; then
 
+# Do not remove the user-supplied optimization flags in CFLAGS
+# PR: 150854
+if false; then
     ac_var_stripped=""
   for word1 in $tmp_CFLAGS; do
     ac_var_strip_word="no"
@@ -16928,6 +16935,7 @@
   done
     tmp_CPPFLAGS="$ac_var_stripped"
   squeeze tmp_CPPFLAGS
+fi
 
       if test "$want_optimize" = "yes"; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5
@@ -21379,7 +21387,8 @@
         PKGTEST="no"
     PREFIX_OPENSSL=$OPT_SSL
 
-                OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
+                # Use the FreeBSD location of the pkgconf libdir
+                OPENSSL_PCDIR="$LOCALBASE/libdata/pkgconfig"
     { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
 $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
     if test -f "$OPENSSL_PCDIR/openssl.pc"; then
@@ -24725,29 +24734,30 @@
     ;;
   off)
         LIB_RTMP="-lrtmp"
+        LD_RTMP=""
+        CPP_RTMP=""
+        DIR_RTMP=""
     ;;
   *)
         PREFIX_RTMP=$OPT_LIBRTMP
+        LIB_RTMP="-lrtmp"
+        LD_RTMP="-L${PREFIX_RTMP}/lib$libsuff"
+        CPP_RTMP="-I${PREFIX_RTMP}/include"
+        DIR_RTMP="${PREFIX_RTMP}/lib$libsuff"
     ;;
   esac
 
-    if test -n "$PREFIX_RTMP"; then
-    LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
-    CPP_RTMP=-I${PREFIX_RTMP}/include
-    DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
-  fi
-
   LDFLAGS="$LDFLAGS $LD_RTMP"
   CPPFLAGS="$CPPFLAGS $CPP_RTMP"
   LIBS="$LIB_RTMP $LIBS"
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5
-$as_echo_n "checking for RTMP_Init in -lrtmp... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in $LIB_RTMP" >&5
+$as_echo_n "checking for RTMP_Init in $LIB_RTMP... " >&6; }
 if ${ac_cv_lib_rtmp_RTMP_Init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrtmp  $LIBS"
+LIBS="$LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */