summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Abdulkadir <autostart.ini@gmail.com>2017-04-16 01:55:00 +0300
committerAli Abdulkadir <autostart.ini@gmail.com>2018-06-09 15:21:58 +0300
commit17ab59c7beb34afe622404e914ed7fcac4d53b03 (patch)
tree364730746482cf9b6a6cfcfe6564ccdf462107de
parentc2417fbe8ba6f165c5629451b7c540e91e3d6d86 (diff)
downloadlibnet-17ab59c7beb34afe622404e914ed7fcac4d53b03.tar.gz
Updated and bugfixed libnet-config
- the include directory wasn't a fully qualified path - replaced hard-coded shebang - added --prefix option - added man page notice - added executable permissions
-rw-r--r--libnet/configure.ac4
-rw-r--r--libnet/libnet-config.in21
2 files changed, 17 insertions, 8 deletions
diff --git a/libnet/configure.ac b/libnet/configure.ac
index 5250160..eb00cde 100644
--- a/libnet/configure.ac
+++ b/libnet/configure.ac
@@ -80,8 +80,9 @@ fi
if test "${exec_prefix}" = "NONE"; then
exec_prefix=$prefix
fi
-dnl libdir must be a fully qualified path (not ${exec_prefix}/lib)
+dnl libdir and includedir must be fully qualified paths (not ${prefix}/lib)
eval libdir="$libdir"
+eval libdir="$includedir"
dnl Get link-layer interface type
AC_ARG_WITH(
@@ -444,6 +445,7 @@ AC_CONFIG_FILES([Makefile \
src/Makefile \
sample/Makefile \
doc/libnet.doxygen.conf])
+AC_CONFIG_COMMANDS([default],[chmod 755 libnet-config],[])
AC_OUTPUT
AC_MSG_RESULT([
diff --git a/libnet/libnet-config.in b/libnet/libnet-config.in
index 15722f5..91f4dee 100644
--- a/libnet/libnet-config.in
+++ b/libnet/libnet-config.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
#
# Libnet 1.2 libnet-config compilation script
# (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
@@ -16,17 +16,20 @@ usage()
cat <<EOF
Usage: libnet-config [OPTIONS]
Options:
- [--libs] print library linking information
- [--cflags] print compiler flags
- [--defines] print pre-processor definitions
- [--version] print libnet version
+ --libs print library linking information
+ --cflags print compiler flags
+ --prefix print libnet install prefix
+ --defines print pre-processor definitions
+ --version print libnet version
+
+See the libnet-config man page for more information.
EOF
- exit $1
+ exit $1
}
if test $# -eq 0; then
- usage 1 1>&2
+ usage 1 1>&2
fi
while test $# -gt 0; do
@@ -48,6 +51,10 @@ while test $# -gt 0; do
echo_cflags=yes
;;
+ --prefix)
+ echo @prefix@
+ ;;
+
--defines)
echo_defines=yes
;;