]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
use tr to deal with trailing newline from pkg-config in ntp_openssl.m4
authorDave Hart <hart@ntp.org>
Fri, 7 Jan 2011 17:46:18 +0000 (17:46 +0000)
committerDave Hart <hart@ntp.org>
Fri, 7 Jan 2011 17:46:18 +0000 (17:46 +0000)
bk: 4d27516asVUb09XQaby1glKfXXUvqA

m4/ntp_openssl.m4

index 13fd3a1c81b206cad05f73608feafb9409bdce31..fba569395aeda1fefd68311e6b8f7a20f9bd3d52 100644 (file)
@@ -69,9 +69,8 @@ case "$ans" in
      '')
        ;;
      *)
-       pkgans=`$PKG_CONFIG --libs-only-L openssl | sed -e 's/^-L//' 2>/dev/null`
-       # strip trailing whitespace
-       pkgans=`set $pkgans ; echo $[1]`
+       pkgans=`$PKG_CONFIG --libs-only-L openssl 2>/dev/null`
+       pkgans=`echo $pkgans | sed -e 's/^-L//' | tr -d '\n' | tr -d ' '`
        if test -f "${pkgans}/pkgconfig/openssl.pc" ; then
            ans="$pkgans"
        fi
@@ -141,9 +140,8 @@ case "$ans" in
      '')
        ;;
      *)
-       pkgans=`$PKG_CONFIG --cflags-only-I openssl | sed -e 's/^-I//' 2>/dev/null`
-       # strip trailing whitespace
-       pkgans=`set $pkgans ; echo $[1]`
+       pkgans=`$PKG_CONFIG --cflags-only-I openssl 2>/dev/null`
+       pkgans=`echo $pkgans | sed -e 's/^-I//' | tr -d '\n' | tr -d ' '`
        if test -f "${pkgans}/openssl/evp.h" ; then
            ans="$pkgans"
        fi