1: #!/bin/sh
2: #
3: # Libnet 1.1 libnet-config compilation script
4: # (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
5: #
6: # Kept for compatibility with existing projects. For new
7: # projects, or those looking to upgrade, we recommend the
8: # new pkg-config framework, libnet.pc. See the README.md
9: # for details on how to use it.
10: #
11: # @configure_input@
12:
13: prefix=@prefix@
14: exec_prefix=@exec_prefix@
15: libdir=@libdir@
16: includedir=@includedir@
17:
18: libnet_defines="@PKG_CONFIG_DEFINES@"
19: libnet_cflags="-I${includedir} @PKG_CONFIG_CFLAGS@"
20: libnet_libs="-L${libdir} @PKG_CONFIG_LIBS@ -lnet"
21:
22: usage()
23: {
24: cat <<EOF
25: Usage: libnet-config [OPTIONS]
26: Options:
27: [--libs]
28: [--cflags]
29: [--defines]
30: EOF
31: exit
32: }
33:
34: while test $# -gt 0; do
35: case "$1" in
36: -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
37: *) optarg= ;;
38: esac
39:
40: case $1 in
41: --libs)
42: echo_libs=yes
43: ;;
44:
45: --cflags)
46: echo_cflags=yes
47: ;;
48:
49: --defines)
50: echo_defines=yes
51: ;;
52: *)
53: usage 1
54: esac
55: shift
56: done
57:
58: if test "$echo_libs" = "yes"; then
59: echo $libnet_libs
60: fi
61:
62: if test "$echo_cflags" = "yes"; then
63: echo $libnet_cflags
64: fi
65:
66: if test "$echo_defines" = "yes"; then
67: echo $libnet_defines
68: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>