More correct implementation of the --disable-usr-local option.

svn path=/trunk/; revision=10661
This commit is contained in:
Olivier Biot 2004-04-22 20:02:58 +00:00
parent 51f987e04f
commit c05bcd7c28
2 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of the Autoconf packaging for Ethereal.
dnl Copyright (C) 1998-2000 by Gerald Combs.
dnl
dnl $Id: acinclude.m4,v 1.71 2004/03/27 12:07:56 jmayer Exp $
dnl $Id: acinclude.m4,v 1.72 2004/04/22 20:02:58 obiot Exp $
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -275,7 +275,11 @@ AC_DEFUN([AC_ETHEREAL_PCAP_CHECK],
#
AC_MSG_CHECKING(for extraneous pcap header directories)
found_pcap_dir=""
for pcap_dir in /usr/include/pcap $prefix/include/pcap $prefix/include /usr/local/include/pcap
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
for pcap_dir in $pcap_dir_list
do
if test -d $pcap_dir ; then
if test x$pcap_dir != x/usr/include -a x$pcap_dir != x/usr/local/include ; then

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.255 2004/04/14 18:42:19 obiot Exp $
# $Id: configure.in,v 1.256 2004/04/22 20:02:58 obiot Exp $
#
AC_INIT(etypes.h)
@ -152,10 +152,10 @@ 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,
[ --enable-usr-local look for headers and libs in /usr/local tree. [default=yes]],enable_usr_local=$enableval,enable_usr_local=yes)
[ --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$enable_usr_local" = "xyes" ; then
if test "x$ac_cv_enable_usr_local" = "xyes" ; then
AC_MSG_RESULT(yes)
#
# Arrange that we search for header files in the source directory