Commit 12553a2e authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: include /usr/local in search for system headers/libraries

- this is consistent with compiler defaults, and helps Darwin users
parent e43ae3f2
......@@ -3,6 +3,7 @@ CGAL_INC = \
-I$(MPFR_ARCH_PATH)/include \
-I$(BOOST_ARCH_PATH)/include \
-I$(CGAL_ARCH_PATH)/include \
-I/usr/local/include \
-I/usr/include
CGAL_LIBS = \
......
......@@ -82,12 +82,23 @@ have_boost()
)
elif isSystem "$BOOST_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -82,12 +82,23 @@ have_cgal()
)
elif isSystem "$CGAL_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -82,12 +82,23 @@ have_fftw()
)
elif isSystem "$FFTW_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -90,12 +90,23 @@ have_kahip()
)
elif isSystem "$KAHIP_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -91,12 +91,23 @@ have_metis()
)
elif isSystem "$METIS_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -91,12 +91,23 @@ have_mgridgen()
)
elif isSystem "$MGRIDGEN_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -61,12 +61,23 @@ have_readline()
library="libreadline$extLibso"
# System only?
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
# Header found?
[ -n "$header" ] || {
......
......@@ -91,12 +91,28 @@ have_scotch()
)
elif isSystem "$SCOTCH_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header /usr/include/scotch/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
header=$(findFirstFile \
/usr/local/include/$header \
/usr/local/include/scotch/$header \
/usr/include/$header \
/usr/include/scotch/$header \
)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
......@@ -90,12 +90,23 @@ have_zoltan()
)
elif isSystem "$ZOLTAN_ARCH_PATH"
then
header=$(findFirstFile /usr/include/$header)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
case "$header" in
/usr/local/*)
library=$(findFirstFile \
/usr/local/lib/$library \
/usr/local/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
*)
library=$(findFirstFile \
/usr/lib/$library \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \
)
;;
esac
else
unset header library
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment