From: Guy Harris Date: Sun, 23 Jan 2011 21:35:31 +0000 (-0800) Subject: Handle POSIX quoting rules. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/bfb110c4ff9853102899cdfc9cd6b99f0925b7a7 Handle POSIX quoting rules. See section 11.6 "Shell Substitutions" in the autoconf documentation, especially the There is just no portable way to use double-quoted strings inside double-quoted back-quoted expressions (pfew!). part. --- diff --git a/aclocal.m4 b/aclocal.m4 index 959ddd5e..91896b34 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -315,8 +315,9 @@ AC_DEFUN(AC_LBL_LIBPCAP, # Found - use it to get the include flags for # libpcap and the flags to link with libpcap. # - $2="`\"$PCAP_CONFIG\" --cflags` $$2" - libpcap="`\"$PCAP_CONFIG\" --libs`" + cflags=`"$PCAP_CONFIG" --cflags` + $2="$cflags $$2" + libpcap=`"$PCAP_CONFIG" --libs` else # # Not found; look for pcap. @@ -380,7 +381,8 @@ AC_DEFUN(AC_LBL_LIBPCAP, # to link with the libpcap archive library in # that directory # - libpcap="$libpcap `\"$PCAP_CONFIG\" --additional-libs --static`" + additional_libs=`"$PCAP_CONFIG" --additional-libs --static` + libpcap="$libpcap $additional_libs" fi fi LIBS="$libpcap $LIBS" diff --git a/configure b/configure index 4ee6f4bb..1f26a193 100755 --- a/configure +++ b/configure @@ -9574,8 +9574,9 @@ fi # Found - use it to get the include flags for # libpcap and the flags to link with libpcap. # - V_INCLS="`\"$PCAP_CONFIG\" --cflags` $V_INCLS" - libpcap="`\"$PCAP_CONFIG\" --libs`" + cflags=`"$PCAP_CONFIG" --cflags` + V_INCLS="$cflags $V_INCLS" + libpcap=`"$PCAP_CONFIG" --libs` else # # Not found; look for pcap. @@ -9725,7 +9726,8 @@ fi # to link with the libpcap archive library in # that directory # - libpcap="$libpcap `\"$PCAP_CONFIG\" --additional-libs --static`" + additional_libs=`"$PCAP_CONFIG" --additional-libs --static` + libpcap="$libpcap $additional_libs" fi fi LIBS="$libpcap $LIBS"