diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-25 23:08:15 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-10-25 23:08:15 (GMT) |
commit | 1ddbeb522842009b40a9404f15a4e56ae4c6dda4 (patch) | |
tree | 170476e66da38d7e489fb746634cd8650b30d77a /contrib/build-scripts/build-swi-macosx.sh | |
parent | 43a0db67ba6527b00d7c60347675803ac3b1cfaa (diff) | |
download | uscxml-1ddbeb522842009b40a9404f15a4e56ae4c6dda4.zip uscxml-1ddbeb522842009b40a9404f15a4e56ae4c6dda4.tar.gz uscxml-1ddbeb522842009b40a9404f15a4e56ae4c6dda4.tar.bz2 |
Fixed building on MacOSX 10.9 Mavericks
Diffstat (limited to 'contrib/build-scripts/build-swi-macosx.sh')
-rwxr-xr-x | contrib/build-scripts/build-swi-macosx.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/contrib/build-scripts/build-swi-macosx.sh b/contrib/build-scripts/build-swi-macosx.sh new file mode 100755 index 0000000..2bea261 --- /dev/null +++ b/contrib/build-scripts/build-swi-macosx.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# +# build SWI Prolog for MacOSX +# + +# exit on error +set -e + +ME=`basename $0` +DIR="$( cd "$( dirname "$0" )" && pwd )" +DEST_DIR="${DIR}/../prebuilt/darwin-i386/gnu" +VERSION=`cat VERSION` + +if [ ! -f src/pl-main.c ]; then + echo + echo "Cannot find src/pl-main.c" + echo "Run script from within SWI prolog directory:" + echo "pl-devel$ ../../${ME}" + echo + exit +fi + +./prepare +cd src +if [ -f Makefile ]; then + make clean +fi + +#CPPFLAGS="-DHAVE_CURSES_H=0 -DHAVE_TGETENT=0 -DHAVE_TCSETATTR=0 -DHAVE_TERM_H=0 -DHAVE_LIBNCURSES=0" \ + +./configure \ +CFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ +CXXFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ +LDFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ +--disable-gmp --disable-readline \ +--prefix=${DEST_DIR} + +sed -ie 's/define HAVE_CURSES_H 1/undef HAVE_CURSES_H/' config.h +sed -ie 's/define HAVE_TGETENT 1/undef HAVE_TGETENT/' config.h +sed -ie 's/define HAVE_TCSETATTR 1/undef HAVE_TCSETATTR/' config.h +sed -ie 's/define HAVE_TERM_H 1/undef HAVE_TERM_H/' config.h +sed -ie 's/define HAVE_LIBNCURSES 1/undef HAVE_LIBNCURSES/' config.h + +make -j2 +make install +make clean + +cd ../packages/cpp +# ./configure --prefix=${DEST_DIR} +# make install + +cp SWI-cpp.h ${DEST_DIR}/lib/swipl-${VERSION}/include + +# export PATH=$PATH:${DEST_DIR}/lib/swipl-6.3.5/bin/x86_64-darwin12.2.0/ + + +rm -rf ${DEST_DIR}/bin +rm -rf ${DEST_DIR}/share +rm -rf ${DEST_DIR}/lib/pkgconfig
\ No newline at end of file |