You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncu...

16 lines
675 B

--- ocaml-4.01.0-orig/configure 2013-08-23 16:22:36.000000000 +1000
+++ ocaml-4.01.0/configure 2014-01-18 20:06:50.669644267 +1100
@@ -892,7 +892,11 @@
# For the terminfo module
if test "$withcurses" = "yes"; then
- for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
+ ncurseslibs=""
+ if pkg-config --exists ncurses 2>/dev/null; then
+ ncurseslibs=`pkg-config --libs ncurses`
+ fi
+ for libs in "${ncurseslibs}" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
echo "termcap functions found (with libraries '$libs')"
echo "#define HAS_TERMCAP" >> s.h