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

- this is consistent with compiler defaults, and helps Darwin users
This commit is contained in:
Mark Olesen
2018-05-30 14:45:12 +02:00
parent e43ae3f23f
commit 12553a2e43
10 changed files with 150 additions and 45 deletions

View File

@ -3,6 +3,7 @@ CGAL_INC = \
-I$(MPFR_ARCH_PATH)/include \ -I$(MPFR_ARCH_PATH)/include \
-I$(BOOST_ARCH_PATH)/include \ -I$(BOOST_ARCH_PATH)/include \
-I$(CGAL_ARCH_PATH)/include \ -I$(CGAL_ARCH_PATH)/include \
-I/usr/local/include \
-I/usr/include -I/usr/include
CGAL_LIBS = \ CGAL_LIBS = \

View File

@ -82,12 +82,23 @@ have_boost()
) )
elif isSystem "$BOOST_ARCH_PATH" elif isSystem "$BOOST_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -82,12 +82,23 @@ have_cgal()
) )
elif isSystem "$CGAL_ARCH_PATH" elif isSystem "$CGAL_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -82,12 +82,23 @@ have_fftw()
) )
elif isSystem "$FFTW_ARCH_PATH" elif isSystem "$FFTW_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -90,12 +90,23 @@ have_kahip()
) )
elif isSystem "$KAHIP_ARCH_PATH" elif isSystem "$KAHIP_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -91,12 +91,23 @@ have_metis()
) )
elif isSystem "$METIS_ARCH_PATH" elif isSystem "$METIS_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -91,12 +91,23 @@ have_mgridgen()
) )
elif isSystem "$MGRIDGEN_ARCH_PATH" elif isSystem "$MGRIDGEN_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi

View File

@ -61,12 +61,23 @@ have_readline()
library="libreadline$extLibso" library="libreadline$extLibso"
# System only? # System only?
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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? # Header found?
[ -n "$header" ] || { [ -n "$header" ] || {

View File

@ -91,12 +91,28 @@ have_scotch()
) )
elif isSystem "$SCOTCH_ARCH_PATH" elif isSystem "$SCOTCH_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header /usr/include/scotch/$header) header=$(findFirstFile \
/usr/local/include/$header \
library=$(findFirstFile \ /usr/local/include/scotch/$header \
/usr/lib/$library \ /usr/include/$header \
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ /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 else
unset header library unset header library
fi fi

View File

@ -90,12 +90,23 @@ have_zoltan()
) )
elif isSystem "$ZOLTAN_ARCH_PATH" elif isSystem "$ZOLTAN_ARCH_PATH"
then then
header=$(findFirstFile /usr/include/$header) header=$(findFirstFile /usr/local/include/$header /usr/include/$header)
library=$(findFirstFile \ case "$header" in
/usr/lib/$library \ /usr/local/*)
/usr/lib$WM_COMPILER_LIB_ARCH/$library \ 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 else
unset header library unset header library
fi fi