configure.ac: Remove --enable-usr-local

Let the compiler and linker handle the system default search path.

Generally give priority to /usr/local when doing "manual" searches.

Change-Id: I3bde7af1226305d94ddb4bc96cefe9ef91e26769
Reviewed-on: https://code.wireshark.org/review/14564
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
João Valverde 2016-03-22 21:03:18 +00:00 committed by João Valverde
parent ed350dd350
commit 125989780b
2 changed files with 2 additions and 61 deletions

View File

@ -343,10 +343,7 @@ AC_DEFUN([AC_WIRESHARK_PCAP_CHECK],
#
AC_MSG_CHECKING(for extraneous pcap header directories)
found_pcap_dir=""
pcap_dir_list="/usr/include/pcap $prefix/include/pcap $prefix/include"
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
pcap_dir_list="$pcap_dir_list /usr/local/include/pcap"
fi
pcap_dir_list="/usr/local/include/pcap /usr/include/pcap $prefix/include/pcap $prefix/include"
for pcap_dir in $pcap_dir_list
do
if test -d $pcap_dir ; then
@ -751,7 +748,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
then
# The user didn't tell us where to look so we'll look in some
# standard locations.
want_lua_dir="/usr /usr/local $prefix"
want_lua_dir="/usr/local /usr $prefix"
fi
for dir in $want_lua_dir
do
@ -990,12 +987,6 @@ AC_DEFUN([AC_WIRESHARK_C_ARES_CHECK],
if test "x$want_c_ares" = "xdefaultyes"; then
want_c_ares=yes
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
if test "x$want_c_ares" = "xyes"; then
@ -1021,12 +1012,6 @@ AC_DEFUN([AC_WIRESHARK_LIBCAP_CHECK],
if test "x$want_libcap" = "xdefaultyes"; then
want_libcap=yes
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
if test "x$want_libcap" = "xyes"; then
@ -1307,12 +1292,6 @@ AC_DEFUN([AC_WIRESHARK_GEOIP_CHECK],
if test "x$want_geoip" = "xdefaultyes"; then
want_geoip=yes
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
if test "x$want_geoip" = "xyes"; then
@ -1344,12 +1323,6 @@ AC_DEFUN([AC_WIRESHARK_LIBSSH_CHECK],
if test "x$want_libssh" = "xdefaultyes"; then
want_libssh=yes
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
withval=/usr/local
if test -d "$withval"; then
AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib)
fi
fi
fi
if test "x$want_libssh" = "xyes"; then

View File

@ -1451,38 +1451,6 @@ solaris*)
;;
esac
dnl Look in /usr/local for header files and libraries ?
dnl XXX FIXME don't include /usr/local if it is already in the system
dnl search path as this causes gcc 3.2 on Linux to complain about a change
dnl of the system search order for includes
AC_ARG_ENABLE(usr-local,
AC_HELP_STRING( [--enable-usr-local],
[look for headers and libs in /usr/local tree @<:@default=yes@:>@]),
ac_cv_enable_usr_local=$enableval,ac_cv_enable_usr_local=yes)
AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
if test -d "/usr/local"; then
AC_MSG_RESULT(yes)
#
# Arrange that we search for header files in the source directory
# and in its "wiretap" subdirectory, as well as in "/usr/local/include",
# as various packages we use ("libpcap", "zlib", "c-ares")
# may have been installed under "/usr/local/include".
#
AX_APPEND_FLAG([-I/usr/local/include], [WS_CPPFLAGS])
#
# Arrange that we search for libraries in "/usr/local/lib".
#
AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, /usr/local/lib)
else
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no)
fi
#
# If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
# link directory.