From: Dave Hart Date: Fri, 7 Jan 2011 17:46:18 +0000 (+0000) Subject: use tr to deal with trailing newline from pkg-config in ntp_openssl.m4 X-Git-Tag: NTP_4_2_7P114~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=423f39b4b80bfd5db1c7e35d575fd84a7a86e050;p=thirdparty%2Fntp.git use tr to deal with trailing newline from pkg-config in ntp_openssl.m4 bk: 4d27516asVUb09XQaby1glKfXXUvqA --- diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4 index 13fd3a1c8..fba569395 100644 --- a/m4/ntp_openssl.m4 +++ b/m4/ntp_openssl.m4 @@ -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