File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libnet / libnet-config.in
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Sep 27 11:11:37 2023 UTC (7 months, 4 weeks ago) by misho
Branches: libnet, MAIN
CVS tags: v1_2p1, HEAD
Version 1.2p1

#!/bin/sh
#
#   Libnet 1.1 libnet-config compilation script
#   (c) 1998 - 2004  Mike D. Schiffman <mike@infonexus.com>
#
#   Kept for compatibility with existing projects.  For new
#   projects, or those looking to upgrade, we recommend the
#   new pkg-config framework, libnet.pc.  See the README.md
#   for details on how to use it.
#
#   @configure_input@

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

libnet_defines="@PKG_CONFIG_DEFINES@"
libnet_cflags="-I${includedir} @PKG_CONFIG_CFLAGS@"
libnet_libs="-L${libdir} @PKG_CONFIG_LIBS@ -lnet"

usage()
{
        cat <<EOF
Usage: libnet-config [OPTIONS]
Options:
        [--libs]
        [--cflags]
        [--defines]
EOF
        exit
}

while test $# -gt 0; do
    case "$1" in
    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    *) optarg= ;;
    esac 

    case $1 in
        --libs)
            echo_libs=yes
            ;;

        --cflags)
            echo_cflags=yes
            ;;

        --defines)
            echo_defines=yes
            ;;
        *)
            usage 1
        esac
    shift
done

if test "$echo_libs" = "yes"; then
    echo $libnet_libs
fi

if test "$echo_cflags" = "yes"; then
    echo $libnet_cflags
fi

if test "$echo_defines" = "yes"; then
    echo $libnet_defines
fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>