mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Use CPPFLAGS for -I, not CFLAGS or CXXFLAGS
CPPFLAGS is for the C Pre-Processor, and should be used for -I flags. In a couple cases (nping, nmap) this was resulting in duplicate -Ilibpcap arguments.
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -26,8 +26,7 @@ if test "$user_localdirs" = 1; then
|
|||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
fi
|
fi
|
||||||
if test -d /usr/local/include; then
|
if test -d /usr/local/include; then
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
CXXFLAGS="$CXXFLAGS -I/usr/local/include"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -373,7 +372,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
|||||||
have_libpcap=no
|
have_libpcap=no
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_cppflags=$CXXFLAGS
|
_cppflags=$CPPFLAGS
|
||||||
_ldflags=$LDFLAGS
|
_ldflags=$LDFLAGS
|
||||||
|
|
||||||
CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
|
CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
|
||||||
@@ -386,7 +385,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
|||||||
LIBPCAP_LIB=$with_libpcap/lib])])
|
LIBPCAP_LIB=$with_libpcap/lib])])
|
||||||
|
|
||||||
LDFLAGS=$_ldflags
|
LDFLAGS=$_ldflags
|
||||||
CXXFLAGS=$_cppflags
|
CPPFLAGS=$_cppflags
|
||||||
;;
|
;;
|
||||||
esac]
|
esac]
|
||||||
)
|
)
|
||||||
@@ -397,9 +396,6 @@ fi
|
|||||||
|
|
||||||
if test $have_libpcap = yes; then
|
if test $have_libpcap = yes; then
|
||||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||||
_cflags=$CXXFLAGS
|
|
||||||
_ldflags=$LDFLAGS
|
|
||||||
|
|
||||||
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
||||||
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ if test "$user_localdirs" = 1; then
|
|||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
fi
|
fi
|
||||||
if test -d /usr/local/include; then
|
if test -d /usr/local/include; then
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ AC_ARG_WITH(openssl,[ --with-openssl=DIR Use optional openssl libs and inclu
|
|||||||
*)
|
*)
|
||||||
specialssldir="$with_openssl"
|
specialssldir="$with_openssl"
|
||||||
LDFLAGS="$LDFLAGS -L$with_openssl/lib"
|
LDFLAGS="$LDFLAGS -L$with_openssl/lib"
|
||||||
CFLAGS="-I$with_openssl/include $CFLAGS"
|
CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
|
||||||
;;
|
;;
|
||||||
esac]
|
esac]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ if test "$user_localdirs" = 1; then
|
|||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
fi
|
fi
|
||||||
if test -d /usr/local/include; then
|
if test -d /usr/local/include; then
|
||||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
CXXFLAGS="$CFLAGS -I/usr/local/include"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -203,7 +202,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
|||||||
have_libpcap=no
|
have_libpcap=no
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_cppflags=$CXXFLAGS
|
_cppflags=$CPPFLAGS
|
||||||
_ldflags=$LDFLAGS
|
_ldflags=$LDFLAGS
|
||||||
|
|
||||||
CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
|
CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
|
||||||
@@ -216,7 +215,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
|||||||
LIBPCAP_LIB=$with_libpcap/lib])])
|
LIBPCAP_LIB=$with_libpcap/lib])])
|
||||||
|
|
||||||
LDFLAGS=$_ldflags
|
LDFLAGS=$_ldflags
|
||||||
CXXFLAGS=$_cppflags
|
CPPFLAGS=$_cppflags
|
||||||
;;
|
;;
|
||||||
esac]
|
esac]
|
||||||
)
|
)
|
||||||
@@ -227,9 +226,6 @@ fi
|
|||||||
|
|
||||||
if test $have_libpcap = yes; then
|
if test $have_libpcap = yes; then
|
||||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||||
_cflags=$CXXFLAGS
|
|
||||||
_ldflags=$LDFLAGS
|
|
||||||
|
|
||||||
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
||||||
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user