Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libpcap/dist don't print -L/usr/lib and -I/usr/...



details:   https://anonhg.NetBSD.org/src/rev/c8ecf209771d
branches:  trunk
changeset: 759274:c8ecf209771d
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Dec 05 03:01:39 2010 +0000

description:
don't print -L/usr/lib and -I/usr/include for no reason.

diffstat:

 external/bsd/libpcap/dist/pcap-config.in |  31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diffs (68 lines):

diff -r fc4d04e36caa -r c8ecf209771d external/bsd/libpcap/dist/pcap-config.in
--- a/external/bsd/libpcap/dist/pcap-config.in  Sun Dec 05 03:00:44 2010 +0000
+++ b/external/bsd/libpcap/dist/pcap-config.in  Sun Dec 05 03:01:39 2010 +0000
@@ -39,6 +39,19 @@
                RPATH=@V_RPATH_OPT@@libdir@
        fi
 fi
+if [ "@includedir@" != "/usr/include" ]
+then
+       i="-I@includedir@"
+fi
+if [ "@libdir@" != "/usr/lib" ]
+then
+       l="-L@libdir@"
+fi
+if [ -n "@LIBS@" ]
+then
+       L="@LIBS@"
+fi
+
 if [ "$static" = 1 ]
 then
        #
@@ -47,19 +60,19 @@
        #
        if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
        then
-               echo "-I@includedir@ -L@libdir@ -lpcap @LIBS@"
+               echo "$i $l -lpcap $L"
        elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
        then
-               echo "-I@includedir@ -L@libdir@ @LIBS@"
+               echo "$i $l $L"
        elif [ "$show_cflags" = 1 ]
        then
-               echo "-I@includedir@"
+               echo "$i"
        elif [ "$show_libs" = 1 ]
        then
-               echo "-L@libdir@ -lpcap @LIBS@"
+               echo "$l -lpcap $L"
        elif [ "$show_additional_libs" = 1 ]
        then
-               echo "@LIBS@"
+               echo "$L"
        fi
 else
        #
@@ -68,15 +81,15 @@
        #
        if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
        then
-               echo "-I@includedir@ -L@libdir@ $RPATH -lpcap"
+               echo "$l $RPATH -lpcap"
        elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
        then
-               echo "-I@includedir@"
+               echo "$i"
        elif [ "$show_cflags" = 1 ]
        then
-               echo "-I@includedir@"
+               echo "$i"
        elif [ "$show_libs" = 1 ]
        then
-               echo "-L@libdir@ $RPATH -lpcap"
+               echo "$l $RPATH -lpcap"
        fi
 fi



Home | Main Index | Thread Index | Old Index