If using $prefix we add "$prefix/include" to the include search path
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Aug 2008 16:16:28 +0000 (16:16 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Aug 2008 16:16:28 +0000 (16:16 +0000)
and "$prefix/lib" to the library search path.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25969 f5534014-38df-0310-8fa8-9805f1628bb7

configure.in

index 21d56f288b56417ff91f420eca74e4d25dd80e6b..055e8fa6197a8f92c5ff051f64b89c0700ad345c 100644 (file)
@@ -447,6 +447,30 @@ darwin*)
 esac
 AC_SUBST(FRAMEWORKS)
 
+#
+# If using $prefix we add "$prefix/include" to the include search path
+# and "$prefix/lib" to the library search path.
+#
+if test "x$prefix" != "x" ; then
+       AC_MSG_CHECKING(whether to use $prefix for headers and libraries)
+       if test -d $prefix/include ; then
+               AC_MSG_RESULT(yes)
+               #
+               # Arrange that we search for header files in "$prefix/include", as
+               # various packages we use may have been installed under "$prefix/include".
+               #
+               CFLAGS="$CFLAGS -I$prefix/include"
+               CPPFLAGS="$CPPFLAGS -I$prefix/include"
+
+               #
+               # Arrange that we search for libraries in "$prefix/lib".
+               #
+               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib)
+       else
+               AC_MSG_RESULT(no)
+       fi
+fi
+
 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