mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +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"
|
||||
fi
|
||||
if test -d /usr/local/include; then
|
||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
CXXFLAGS="$CXXFLAGS -I/usr/local/include"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -373,7 +372,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
||||
have_libpcap=no
|
||||
;;
|
||||
*)
|
||||
_cppflags=$CXXFLAGS
|
||||
_cppflags=$CPPFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
|
||||
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])])
|
||||
|
||||
LDFLAGS=$_ldflags
|
||||
CXXFLAGS=$_cppflags
|
||||
CPPFLAGS=$_cppflags
|
||||
;;
|
||||
esac]
|
||||
)
|
||||
@@ -397,9 +396,6 @@ fi
|
||||
|
||||
if test $have_libpcap = yes; then
|
||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||
_cflags=$CXXFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
|
||||
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
||||
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
||||
fi
|
||||
|
||||
@@ -34,7 +34,7 @@ if test "$user_localdirs" = 1; then
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
fi
|
||||
if test -d /usr/local/include; then
|
||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ AC_ARG_WITH(openssl,[ --with-openssl=DIR Use optional openssl libs and inclu
|
||||
*)
|
||||
specialssldir="$with_openssl"
|
||||
LDFLAGS="$LDFLAGS -L$with_openssl/lib"
|
||||
CFLAGS="-I$with_openssl/include $CFLAGS"
|
||||
CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
|
||||
;;
|
||||
esac]
|
||||
)
|
||||
|
||||
@@ -24,8 +24,7 @@ if test "$user_localdirs" = 1; then
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
fi
|
||||
if test -d /usr/local/include; then
|
||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
CXXFLAGS="$CFLAGS -I/usr/local/include"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -203,7 +202,7 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap
|
||||
have_libpcap=no
|
||||
;;
|
||||
*)
|
||||
_cppflags=$CXXFLAGS
|
||||
_cppflags=$CPPFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
|
||||
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])])
|
||||
|
||||
LDFLAGS=$_ldflags
|
||||
CXXFLAGS=$_cppflags
|
||||
CPPFLAGS=$_cppflags
|
||||
;;
|
||||
esac]
|
||||
)
|
||||
@@ -227,9 +226,6 @@ fi
|
||||
|
||||
if test $have_libpcap = yes; then
|
||||
if test "${LIBPCAP_INC+set}" = "set"; then
|
||||
_cflags=$CXXFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
|
||||
CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
|
||||
LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user