| Attached Files | ocaml-3.12.0.patch [^] (2,718 bytes) 2011-01-25 19:10 [Show Content] [Hide Content]diff -Naur ocaml-3.12.0/configure ocaml-3.12.0.new/configure
--- ocaml-3.12.0/configure 2010-07-28 14:18:22.000000000 +0100
+++ ocaml-3.12.0.new/configure 2011-01-25 17:37:59.000000000 +0000
@@ -26,13 +26,16 @@
asoption=''
asppoption=''
cclibs=''
+curseslibsoption=''
curseslibs=''
+mathliboption=''
mathlib='-lm'
dllib=''
x11_include_dir=''
x11_lib_dir=''
tk_wanted=yes
pthread_wanted=yes
+pthread_linkoption=''
tk_defs=''
tk_libs=''
tk_x11=yes
@@ -107,6 +110,12 @@
dl_defs="$2"; shift;;
-dllibs*|--dllibs*)
dllib="$2"; shift;;
+ -curseslib|--curseslib)
+ curseslibsoption="$2"; shift;;
+ -mathlib|--mathlib)
+ mathliboption="$2"; shift;;
+ -pthreadlib|--pthreadlib)
+ pthread_linkoption="$2"; shift;;
-verbose|--verbose)
verbose=yes;;
*) echo "Unknown option \"$1\"." 1>&2; exit 2;;
@@ -329,6 +338,10 @@
bytecccompopts="-fno-defer-pop $gcc_warnings";;
esac
+if test ! -z "$mathliboption"; then
+ mathlib="$mathliboption"
+fi
+
# Configure compiler to use in further tests
cc="$bytecc -O $bytecclinkopts"
@@ -626,8 +639,9 @@
i[3456]86-*-darwin[89]*) natdynlink=true;;
powerpc64-*-linux*) natdynlink=true;;
sparc-*-linux*) natdynlink=true;;
- i686-*-kfreebsd*) natdynlink=true;;
- x86_64-*-kfreebsd*) natdynlink=true;;
+
+ i[36]86-*-freebsd*) natdynlink=true;;
+ x86_64-*-freebsd*) natdynlink=true;;
i386-*-gnu0.3) natdynlink=true;;
esac
fi
@@ -880,14 +894,18 @@
# For the terminfo module
if test "$withcurses" = "yes"; then
- for libs in "" "-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
- curseslibs="${libs}"
- break
- fi
- done
+ if test -z "$curseslibsoption"; then
+ for libs in "" "-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
+ curseslibs="${libs}"
+ break
+ fi
+ done
+ else
+ curseslibs="$curseslibsoption"
+ fi
fi
# Configuration for the libraries
@@ -1223,6 +1241,10 @@
echo "sigwait() found"
echo "#define HAS_SIGWAIT" >> s.h
fi
+ if test ! -z "$pthread_linkoption"; then
+ pthread_link="$pthread_linkoption"
+ pthread_caml_link="-cclib $pthread_linkoption"
+ fi
else
echo "POSIX threads not found."
pthread_link=""
|