aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-06-10 10:31:46 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-06-10 10:31:46 +0000
commit933ca0bdfdc3aded7766a13bb05e36d2c932eb4c (patch)
treef73015aa6edad5f304403a053833134cf3455433
parent372cdf09e418d8b8b41bdc57f262579357b3c90f (diff)
Check if /usr/local exists before adding to CFLAGS/CPPFLAGS and LDFLAGS.
svn path=/trunk/; revision=33205
-rw-r--r--configure.in30
1 files changed, 17 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 70bfdebb3b..d6ccc0c699 100644
--- a/configure.in
+++ b/configure.in
@@ -535,20 +535,24 @@ AC_ARG_ENABLE(usr-local,
AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
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
- # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
- # as various packages we use ("libpcap", "zlib", "adns", "pcre")
- # may have been installed under "/usr/local/include".
- #
- CFLAGS="$CFLAGS -I/usr/local/include"
- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ 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", "adns", "pcre")
+ # may have been installed under "/usr/local/include".
+ #
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
- #
- # Arrange that we search for libraries in "/usr/local/lib".
- #
- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+ #
+ # Arrange that we search for libraries in "/usr/local/lib".
+ #
+ AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+ else
+ AC_MSG_RESULT(no)
+ fi
else
AC_MSG_RESULT(no)
fi