blob: 46406e9d0be3a7d18a34c75d7f83570234ed73bf [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001clamav .102.2 tries to find clamav using culf_config. Use EO pkg_config instead
2
3Upstream-Status: OE specific
4Signed-off-by: Armin Kuster <akuster808@gmail.com>
5
6Index: git/configure
7===================================================================
8--- git.orig/configure
9+++ git/configure
10@@ -28850,39 +28850,14 @@ $as_echo_n "checking for libcurl install
11 if test "${with_libcurl+set}" = set; then :
12 withval=$with_libcurl;
13 find_curl="no"
14-if test "X$withval" = "Xyes"; then
15- find_curl="yes"
16-else
17- if test "X$withval" != "Xno"; then
18- if test -f "${withval}/bin/curl-config"; then
19- LIBCURL_HOME="$withval"
20- have_curl="yes"
21- fi
22- fi
23-fi
24-
25-else
26- find_curl="yes"
27-fi
28-
29-
30-if test "X$find_curl" = "Xyes"; then
31- for p in /usr/local /usr ; do
32- if test -f "${p}/bin/curl-config"; then
33- LIBCURL_HOME=$p
34- have_curl="yes"
35- fi
36- done
37-fi
38-
39-if test "X$have_curl" = "Xyes"; then
40- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
41-$as_echo "$LIBCURL_HOME" >&6; }
42- if test -f "$LIBCURL_HOME/bin/curl-config"; then
43+ #save_LDFLAGS="$LDFLAGS"
44+ if test "X$withval" != "Xno"; then
45+ LIBCURL_HOME="$withval"
46+ if test "${PKG_CONFIG} libcurl --exists"; then
47 CURL_LDFLAGS="$LDFLAGS"
48- CURL_LIBS=$($LIBCURL_HOME/bin/curl-config --libs)
49- CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
50- else
51+ CURL_LIBS=$($PKG_CONFIG libcurl --libs)
52+ CURL_CPPFLAGS=$($PKG_CONFIG libcurl --cflags)
53+ else
54 if test "$LIBCURL_HOME" != "/usr"; then
55 CURL_LDFLAGS="-L$LIBCURL_HOME/lib"
56 CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
57@@ -28891,60 +28866,12 @@ $as_echo "$LIBCURL_HOME" >&6; }
58 CURL_CPPFLAGS=""
59 fi
60 CURL_LIBS="-lcurl"
61- fi
62- save_LDFLAGS="$LDFLAGS"
63- LDFLAGS="$CURL_LDFLAGS $CURL_LIBS"
64- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
65-$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
66-if ${ac_cv_lib_curl_curl_easy_init+:} false; then :
67- $as_echo_n "(cached) " >&6
68-else
69- ac_check_lib_save_LIBS=$LIBS
70-LIBS="-lcurl $CURL_LIBS
71- $LIBS"
72-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73-/* end confdefs.h. */
74-
75-/* Override any GCC internal prototype to avoid an error.
76- Use char because int might match the return type of a GCC
77- builtin and then its argument prototype would still apply. */
78-#ifdef __cplusplus
79-extern "C"
80-#endif
81-char curl_easy_init ();
82-int
83-main ()
84-{
85-return curl_easy_init ();
86- ;
87- return 0;
88-}
89-_ACEOF
90-if ac_fn_c_try_link "$LINENO"; then :
91- ac_cv_lib_curl_curl_easy_init=yes
92-else
93- ac_cv_lib_curl_curl_easy_init=no
94-fi
95-rm -f core conftest.err conftest.$ac_objext \
96- conftest$ac_exeext conftest.$ac_ext
97-LIBS=$ac_check_lib_save_LIBS
98-fi
99-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
100-$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
101-if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then :
102-
103- curl_msg="";
104- have_curl="yes";
105- CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS $CURL_LIBS";
106- CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS";
107- FRESHCLAM_LIBS="$FRESHCLAM_LIBS $CURL_LDFLAGS $CURL_LIBS";
108- FRESHCLAM_CPPFLAGS="$FRESHCLAM_CPPFLAGS $CURL_CPPFLAGS"
109-
110-else
111-
112- as_fn_error $? "Your libcurl is misconfigured. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5
113+ fi
114
115-fi
116+ have_curl="yes"
117+ LDFLAGS="$save_LDFLAGS"
118+ LDFLAGS="$CURL_LDFLAGS $CURL_LIBS"
119+ fi
120
121 LDFLAGS="$save_LDFLAGS"
122 else