mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:31:42 +03:00
curl-config: tidy up, optimize
- optimize out `cppflag_curl_staticlib` variable. - optimize out `CPPFLAG_CURL_STATICLIB` variable and simplify logic. - lowercase local variable name `CURLLIBDIR`. Closes #15810
This commit is contained in:
parent
f5d0ba0e75
commit
415741ef94
1 changed files with 6 additions and 12 deletions
|
|
@ -31,7 +31,6 @@ prefix='@prefix@'
|
|||
exec_prefix="@exec_prefix@"
|
||||
# shellcheck disable=SC2034
|
||||
includedir="@includedir@"
|
||||
cppflag_curl_staticlib='@LIBCURL_PC_CFLAGS@'
|
||||
|
||||
usage()
|
||||
{
|
||||
|
|
@ -142,28 +141,23 @@ while test "$#" -gt 0; do
|
|||
;;
|
||||
|
||||
--cflags)
|
||||
if test "X$cppflag_curl_staticlib" = 'X-DCURL_STATICLIB'; then
|
||||
CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB '
|
||||
else
|
||||
CPPFLAG_CURL_STATICLIB=''
|
||||
fi
|
||||
if test "X@includedir@" = 'X/usr/include'; then
|
||||
echo "${CPPFLAG_CURL_STATICLIB}"
|
||||
echo '@LIBCURL_PC_CFLAGS@'
|
||||
else
|
||||
echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
|
||||
echo "@LIBCURL_PC_CFLAGS@ -I@includedir@"
|
||||
fi
|
||||
;;
|
||||
|
||||
--libs)
|
||||
if test "X@libdir@" != 'X/usr/lib' -a "X@libdir@" != 'X/usr/lib64'; then
|
||||
CURLLIBDIR="-L@libdir@ "
|
||||
curllibdir="-L@libdir@ "
|
||||
else
|
||||
CURLLIBDIR=''
|
||||
curllibdir=''
|
||||
fi
|
||||
if test 'X@ENABLE_SHARED@' = 'Xno'; then
|
||||
echo "${CURLLIBDIR}-lcurl @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
echo "${curllibdir}-lcurl @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
else
|
||||
echo "${CURLLIBDIR}-lcurl"
|
||||
echo "${curllibdir}-lcurl"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue