Skip to content

Commit 01209d5

Browse files
committed
configure.ac: libcurl patch
the include path cannot be hardcoded with: /usr/include/curl/
1 parent 46579bf commit 01209d5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,20 @@ AC_ARG_ENABLE(fw-mgr,
139139
[enable_fw_mgr="no"])
140140
AC_MSG_RESULT($enable_fw_mgr)
141141
if test "x$enable_fw_mgr" = "xyes"; then
142+
# Find curl using pkg-config
143+
PKG_CHECK_MODULES([CURL], [libcurl], [
144+
CURL_INC_DIR=$(pkg-config --cflags-only-I libcurl | sed 's/-I//')
145+
], [
146+
AC_MSG_ERROR([Cannot find curl via pkg-config. Please install libcurl development files.])
147+
])
148+
142149
AC_CHECK_HEADER(curl/curl.h,,AC_MSG_ERROR([cannot find curl/curl.h . this header is needed for compiling fw manager tool]))
150+
143151
AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR([cannot find zlib.h . this header is needed for compiling fw manager tool]))
144152
AC_CHECK_LIB(z, uncompress,, AC_MSG_ERROR([cannot find zlib uncompress() function.]))
145153
AC_CHECK_HEADER(lzma.h,,AC_MSG_ERROR([Cannot find lzma.h.]))
146-
CURL_INC_DIR=/usr/include/curl/
154+
155+
AC_SUBST([CURL_INC_DIR])
147156
fi
148157

149158
# mlxdpa

0 commit comments

Comments
 (0)