diff options
author | Joachim Nilsson <troglobit@gmail.com> | 2019-10-07 17:26:32 +0200 |
---|---|---|
committer | Joachim Nilsson <troglobit@gmail.com> | 2019-10-07 17:28:05 +0200 |
commit | cb0288e5fb5709cfb566cd2e65b53a290acd3ffd (patch) | |
tree | 4aaec5e0b79d403a8bb892287bbd0d2d1149d643 | |
parent | c1db585e80f7c3222a9c72b519855105b8dd8e7c (diff) | |
download | libnet-cb0288e5fb5709cfb566cd2e65b53a290acd3ffd.tar.gz |
Revert "Remove libnet-config, replaced by pkg-config support"
This reverts the removal of libnet-config.in from commit b4063cc. The
reason being it is easier to maintain it during a transitional period,
for compatibility with existing projects.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | debian/libnet-config.1 | 33 | ||||
-rw-r--r-- | debian/libnet1-dev.install | 1 | ||||
-rw-r--r-- | debian/libnet1-dev.manpages | 1 | ||||
-rw-r--r-- | debian/patches/00-fix_build_process.patch | 8 | ||||
-rw-r--r-- | libnet-config.in | 62 |
8 files changed, 110 insertions, 1 deletions
@@ -33,6 +33,7 @@ libnet-1.? libnet-1.?.? libnet-1.?.?.tar.gz libnet-1.?.tar.gz +libnet-config libtool ltmain.sh missing diff --git a/Makefile.am b/Makefile.am index 1d9036b..52dac58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,10 +6,12 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-doxygen-doc --disable-samples ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +bin_SCRIPTS = libnet-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libnet.pc doc_DATA = README.md ChangeLog.md LICENSE -EXTRA_DIST = README.md ChangeLog.md LICENSE README.win32 autogen.sh +EXTRA_DIST = README.md ChangeLog.md LICENSE README.win32 autogen.sh \ + libnet-config.in SUBDIRS = bin include src win32 if ENABLE_DOXYGEN diff --git a/configure.ac b/configure.ac index f2de8fc..15db09b 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_FILES([Makefile \ Doxyfile \ + libnet-config \ bin/Makefile \ doc/Makefile \ include/Makefile \ diff --git a/debian/libnet-config.1 b/debian/libnet-config.1 new file mode 100644 index 0000000..28b74ea --- /dev/null +++ b/debian/libnet-config.1 @@ -0,0 +1,33 @@ +.\" Written by Domenico Andreoli for Debian GNU/Linux. +.\" Do whatever you want with this file. +.\" NO warranty is provided. +.TH libnet-config 1 "18 November 2002" "Libnet 1.1.0" "libnet-config manual" +.SH NAME +libnet-config \- Get information about a libnet installation +.SH SYNOPSIS +.B libnet-config [options] +.SH DESCRIPTION +.B libnet-config +displays information about a previous libnet installation. +.SH OPTIONS +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libnet. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libnet. +.IP "--defines" +Set of compiler defines used to compile libnet. +.SH "EXAMPLES" +What linker options do I need when I link with libnet? + + libnet-config \-\-libs + +What compiler options do I need when I compile using libnet functions? + + libnet-config \-\-cflags +.SH SEE ALSO +.BR libnet (3) +.SH AUTHOR +This manual page was written by Domenico Andreoli <cavok@debian.org> +for the Debian GNU/Linux system (but may be used by others). diff --git a/debian/libnet1-dev.install b/debian/libnet1-dev.install index 9f736cf..8507350 100644 --- a/debian/libnet1-dev.install +++ b/debian/libnet1-dev.install @@ -1,3 +1,4 @@ +usr/bin/libnet-config usr/lib/libnet.a usr/lib/libnet.la usr/lib/libnet.so diff --git a/debian/libnet1-dev.manpages b/debian/libnet1-dev.manpages index d88d363..a6f808a 100644 --- a/debian/libnet1-dev.manpages +++ b/debian/libnet1-dev.manpages @@ -1,3 +1,4 @@ +debian/libnet-config.1 doc/man/man3/libnet-macros.h.3 doc/man/man3/libnet.h.3 doc/man/man3/libnet-functions.h.3 diff --git a/debian/patches/00-fix_build_process.patch b/debian/patches/00-fix_build_process.patch index 082ce75..49b3842 100644 --- a/debian/patches/00-fix_build_process.patch +++ b/debian/patches/00-fix_build_process.patch @@ -1,3 +1,11 @@ +--- libnet-1.1.2.1.orig/Makefile.am ++++ libnet-1.1.2.1/Makefile.am +@@ -12,4 +12,4 @@ + + EXTRA_DIST = Makefile.am.common + +-bin_scripts = libnet-config ++bin_SCRIPTS = libnet-config --- libnet-1.1.2.1.orig/configure.in +++ libnet-1.1.2.1/configure.in @@ -21,10 +21,24 @@ diff --git a/libnet-config.in b/libnet-config.in new file mode 100644 index 0000000..da86f12 --- /dev/null +++ b/libnet-config.in @@ -0,0 +1,62 @@ +#!/bin/sh +# +# $Id: libnet-config.in,v 1.3 2004/01/03 20:31:00 mike Exp $ +# +# Libnet 1.1 libnet-config compilation script +# (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com> +# +# @configure_input@ + +libnet_defines="@LIBNET_CONFIG_DEFINES@" +libnet_cflags="@LIBNET_CONFIG_CFLAGS@" +libnet_libs="@LIBNET_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 + +# EOF |