Fixes in configuration to detect JavascriptCore on MacOSX correctly.
This commit is contained in:
parent
4ac7065c3b
commit
04c0803f73
1 changed files with 54 additions and 45 deletions
99
configure.in
99
configure.in
|
|
@ -1106,11 +1106,13 @@ if test -z "$JSCOREINCDIR"; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
JSCORE=0
|
||||||
for d in $JSCOREINCDIR ; do
|
for d in $JSCOREINCDIR ; do
|
||||||
if test -r "$d/JavaScriptCore/JavaScript.h" || test -r "$d/JavaScript.h" ; then
|
if test -r "$d/JavaScriptCore/JavaScript.h" || test -r "$d/JavaScript.h" ; then
|
||||||
AC_MSG_RESULT($d)
|
AC_MSG_RESULT($d)
|
||||||
JSCOREINCDIR=$d
|
JSCOREINCDIR=$d
|
||||||
JSCOREINC=-I\"$d\"
|
JSCOREINC=-I\"$d\"
|
||||||
|
JSCORE=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
@ -1119,51 +1121,55 @@ if test "$JSCOREINC" = "" ; then
|
||||||
AC_MSG_RESULT(not found)
|
AC_MSG_RESULT(not found)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# under linux look for the javascript core library
|
||||||
|
case $host in
|
||||||
|
*-*-linux*)
|
||||||
|
# check for JavaScriptCore, Webkit libraries
|
||||||
|
AC_ARG_WITH(jscorelib,[ --with-jscorelib =path Set location of JavaScriptCore (Webkit) library directory], [JSCORELIB="-L$withval"], [JSCORELIB=])
|
||||||
|
AC_MSG_CHECKING(for JavaScriptCore(Webkit) library)
|
||||||
|
|
||||||
# check for JavaScriptCore, Webkit libraries
|
if test -z "$JSCORELIB"; then
|
||||||
AC_ARG_WITH(jscorelib,[ --with-jscorelib =path Set location of JavaScriptCore (Webkit) library directory],
|
JSCORELIBDIRS="/usr/lib/ /usr/local/lib/"
|
||||||
[JSCORELIB="-L$withval"], [JSCORELIB=])
|
for i in $JSCORELIBDIRS ; do
|
||||||
AC_MSG_CHECKING(for JavaScriptCore(Webkit) library)
|
|
||||||
|
|
||||||
if test -z "$JSCORELIB"; then
|
if test -r $i/libwebkit-1.0.la; then
|
||||||
dirs="/usr/lib/ /usr/local/lib/"
|
AC_MSG_RESULT($i)
|
||||||
for i in $dirs ; do
|
JSCORELIB="-L$i -lwebkit-1.0"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
if test -r $i/libwebkit-1.0.la; then
|
if test -r $i/libjavascriptcoregtk-1.0.so; then
|
||||||
AC_MSG_RESULT($i)
|
AC_MSG_RESULT($i)
|
||||||
JSCORELIB="-L$i -lwebkit-1.0"
|
JSCORELIB="-L$i -ljavascriptcoregtk-1.0"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -r $i/libjavascriptcoregtk-1.0.so; then
|
if test -r $i/libwebkitgtk-1.0.so; then
|
||||||
AC_MSG_RESULT($i)
|
AC_MSG_RESULT($i)
|
||||||
JSCORELIB="-L$i -ljavascriptcoregtk-1.0"
|
JSCORELIB="-L$i -lwebkitgtk-1.0"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if test -r $i/libwebkitgtk-1.0.so; then
|
if test -z "$JSCORELIB"; then
|
||||||
AC_MSG_RESULT($i)
|
AC_MSG_RESULT(not found)
|
||||||
JSCORELIB="-L$i -lwebkitgtk-1.0"
|
JSCORE=0
|
||||||
break
|
else
|
||||||
fi
|
AC_MSG_RESULT($JSCORELIB)
|
||||||
done
|
JSCORE=1
|
||||||
|
fi
|
||||||
if test -z "$JSCORELIB"; then
|
;;
|
||||||
AC_MSG_RESULT(not found)
|
esac
|
||||||
JSCORE=
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT($JSCORELIB)
|
|
||||||
JSCORE=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# linking options
|
# linking options
|
||||||
case $host in
|
case $host in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
JSCOREDYNAMICLINKING="-framework JavaScriptCore"
|
JSCOREDYNAMICLINKING="-framework JavaScriptCore"
|
||||||
JSCORECFLAGS=""
|
JSCORECFLAGS=""
|
||||||
;;
|
;;
|
||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
JSCOREDYNAMICLINKING="$JSCORELIB"
|
JSCOREDYNAMICLINKING="$JSCORELIB"
|
||||||
JSCORECFLAGS=""
|
JSCORECFLAGS=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -1179,18 +1185,18 @@ case $host in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$JS_NO_WARNINGS" == "1"; then
|
if test "$JS_NO_WARNINGS" == "1"; then
|
||||||
case $host in
|
case $host in
|
||||||
*-*-darwin* | *-*-linux* | *-*-cygwin* | *-*-mingw*)
|
*-*-darwin* | *-*-linux* | *-*-cygwin* | *-*-mingw*)
|
||||||
JSCXXFLAGS="`echo $CXXFLAGS | sed 's/-Wall//g'`"
|
JSCXXFLAGS="`echo $CXXFLAGS | sed 's/-Wall//g'`"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
JSCXXFLAGS="$CXXFLAGS"
|
JSCXXFLAGS="$CXXFLAGS"
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# library output
|
# library output
|
||||||
case $host in
|
case $host in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
JSCORESO=".dylib"
|
JSCORESO=".dylib"
|
||||||
JSCORELDSHARED='$(CC) -dynamiclib'
|
JSCORELDSHARED='$(CC) -dynamiclib'
|
||||||
JSCORECXXSHARED='$(CXX) -dynamiclib'
|
JSCORECXXSHARED='$(CXX) -dynamiclib'
|
||||||
|
|
@ -1201,7 +1207,6 @@ case $host in
|
||||||
JSCORECXXSHARED='$(CXXSHARED)'
|
JSCORECXXSHARED='$(CXXSHARED)'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(JSCORE)
|
AC_SUBST(JSCORE)
|
||||||
AC_SUBST(JSCOREINC)
|
AC_SUBST(JSCOREINC)
|
||||||
|
|
@ -1259,17 +1264,19 @@ done
|
||||||
|
|
||||||
if test "$JSV8LIB" = "" ; then
|
if test "$JSV8LIB" = "" ; then
|
||||||
AC_MSG_RESULT(not found)
|
AC_MSG_RESULT(not found)
|
||||||
|
JSV8=
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT($JSV8LIB)
|
AC_MSG_RESULT($JSV8LIB)
|
||||||
|
JSV8=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# linking options
|
# linking options
|
||||||
case $host in
|
case $host in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
JSV8DYNAMICLINKING="" # TODO: add osx configuration
|
JSV8DYNAMICLINKING="" # TODO: add osx configuration
|
||||||
;;
|
;;
|
||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
JSV8DYNAMICLINKING="$JSV8LIB"
|
JSV8DYNAMICLINKING="$JSV8LIB"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -1277,8 +1284,10 @@ case $host in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AC_SUBST(JSV8)
|
||||||
AC_SUBST(JSV8INC)
|
AC_SUBST(JSV8INC)
|
||||||
AC_SUBST(JSV8DYNAMICLINKING)
|
AC_SUBST(JSV8DYNAMICLINKING)
|
||||||
|
|
||||||
AC_SUBST(JSDEFAULT)
|
AC_SUBST(JSDEFAULT)
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue