]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Handle POSIX quoting rules.
authorGuy Harris <[email protected]>
Sun, 23 Jan 2011 21:35:31 +0000 (13:35 -0800)
committerGuy Harris <[email protected]>
Sun, 23 Jan 2011 21:36:07 +0000 (13:36 -0800)
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.

aclocal.m4
configure

index 959ddd5e3171b5b9203c009edae4d5b553f5219a..91896b340738e334b17612a6e7f64f3e75c44f22 100644 (file)
@@ -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"
index 4ee6f4bb02e9d5df05d6c7309a485d07b6cefdde..1f26a19319ed5b9986f5051aef299421d5f61a29 100755 (executable)
--- 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"