aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-21 13:40:22 +0000
committerOmar Polo <op@omarpolo.com>2021-01-21 13:40:22 +0000
commit86939cb45bd3dc4de80a21254506fdabbb6f731b (patch)
tree948b708435b9dcd0abbd1eb2eaef55335230ea03 /configure
parentf980545b58dd011218c11c00b5ddf1f303b7a647 (diff)
simplify CFLAGS/LDFLAGS autodetection
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 4 insertions, 9 deletions
diff --git a/configure b/configure
index e1456f1..194acf6 100755
--- a/configure
+++ b/configure
@@ -56,15 +56,10 @@ BINDIR=
INSTALL="install"
# try to auto detect CFLAGS and LDFLAGS
-which pkg-config 2>/dev/null 1>&2 && {
- if ! got=`pkg-config --cflags libtls`; then
- CFLAGS="$got"
- fi
-
- if ! got=`pkg-config --libs libtls`; then
- LDFLAGS="$got"
- fi
-}
+if which pkg-config 2>/dev/null 1>&2 && pkg-config libtls; then
+ CFLAGS=`pkg-config --cflags libtls`
+ LDFLAGS=`pkg-config --libs libtls`
+fi
# auto detect lex/flex
which ${LEX} 2>/dev/null 1>&2 || {