win32 support

This commit is contained in:
Vitor Santos Costa 2014-01-22 18:12:58 +00:00
parent 464d6cd125
commit 253735a293
3 changed files with 51 additions and 11 deletions

View File

@ -744,10 +744,10 @@ all: startup.yss
startup.yss: yap@EXEC_SUFFIX@ $(PL_SOURCES) startup.yss: yap@EXEC_SUFFIX@ $(PL_SOURCES)
-rm -f startup.yss -rm -f startup.yss
echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). qsave_program('startup.yss')." | @PRE_INSTALL_ENV@ ./yap -b $(srcdir)/pl/boot.yap echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). qsave_program('startup.yss')." | @PRE_INSTALL_ENV@ ./yap@EXEC_SUFFIX@ -b $(srcdir)/pl/boot.yap
yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@ yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@
$(MPI_CC) $(EXECUTABLE_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS) $(MPI_CC) $(EXECUTABLE_CFLAGS) $(LDFLAGS) -o yap@EXEC_SUFFIX@ yap.o @YAPLIB@ $(LIBS)
yap-win: yap-win@EXEC_SUFFIX@ yap-win: yap-win@EXEC_SUFFIX@
@ -755,7 +755,7 @@ yapwin: yap-win@EXEC_SUFFIX@
yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@ yap-win@EXEC_SUFFIX@: $(PLCONS_OBJECTS) $(HEADERS) @YAPLIB@
(cd swi/console; $(MAKE)) (cd swi/console; $(MAKE))
$(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) @MPILDF@ $(MPI_CC) -municode -DUNICODE -D_UNICODE $(EXECUTABLE_CFLAGS) $(LDFLAGS) -Wl,-subsystem,windows -o yap-win@EXEC_SUFFIX@ $(PLCONS_OBJECTS) plterm.dll @YAPLIB@ $(LIBS) @MPILDF@
libYap.a: $(LIB_OBJECTS) libYap.a: $(LIB_OBJECTS)
-rm -f libYap.a -rm -f libYap.a

32
configure vendored
View File

@ -5081,7 +5081,7 @@ fi
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" -o "$target_os" = "mingw64"
then then
INSTALL_COMMAND=install_win32 INSTALL_COMMAND=install_win32
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows" EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
@ -5490,13 +5490,33 @@ fi
yap_cv_readline=no yap_cv_readline=no
if test "$prefix" = "NONE" if test "$prefix" = "NONE"
then then
if test "$target_win64" = yes #mingw64
case "$build_os" in
*linux*)
if test "${WINEPREFIX}x" = x
then
SYSTEMDRIVE=$HOME/.wine/drive_c
else
SYSTEMDRIVE="$WINEPREFIX"
fi
if test "$target_cpu" = "x86_64"
then
prefix="$SYSTEMDRIVE/Yap64"
else
prefix="$SYSTEMDRIVE/Yap"
fi
;;
**)
if test "$target_cpu" = "x86_64"
then then
prefix="\${SYSTEMDRIVE}/Yap64" prefix="\${SYSTEMDRIVE}/Yap64"
else else
prefix="\${SYSTEMDRIVE}/Yap" prefix="\${SYSTEMDRIVE}/Yap"
fi fi
;;
esac
fi fi
echo $prefix
ENABLE_WINCONSOLE="" ENABLE_WINCONSOLE=""
else else
ENABLE_WINCONSOLE="#" ENABLE_WINCONSOLE="#"
@ -11709,7 +11729,7 @@ else
JAVA_TEST=Test.java JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* #line 11712 "configure" */ /* #line 11732 "configure" */
public class Test { public class Test {
} }
EOF EOF
@ -11885,7 +11905,7 @@ EOF
if uudecode$EXEEXT Test.uue; then if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes ac_cv_prog_uudecode_base64=yes
else else
echo "configure: 11888: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: 11908: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5 echo "configure: failed file was:" >&5
cat Test.uue >&5 cat Test.uue >&5
ac_cv_prog_uudecode_base64=no ac_cv_prog_uudecode_base64=no
@ -12016,7 +12036,7 @@ else
JAVA_TEST=Test.java JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* #line 12019 "configure" */ /* #line 12039 "configure" */
public class Test { public class Test {
} }
EOF EOF
@ -12051,7 +12071,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class CLASS_TEST=Test.class
TEST=Test TEST=Test
cat << \EOF > $JAVA_TEST cat << \EOF > $JAVA_TEST
/* [#]line 12054 "configure" */ /* [#]line 12074 "configure" */
public class Test { public class Test {
public static void main (String args[]) { public static void main (String args[]) {
System.exit (0); System.exit (0);

View File

@ -514,7 +514,7 @@ dnl Check for libraries.
dnl mingw does not get along well with libm dnl mingw does not get along well with libm
dnl cygnus and mingw32 also need wsock32 to use sockets. dnl cygnus and mingw32 also need wsock32 to use sockets.
dnl dnl
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" if test "$target_os" = "cygwin" -o "$target_os" = "mingw32" -o "$target_os" = "mingw64"
then then
INSTALL_COMMAND=install_win32 INSTALL_COMMAND=install_win32
EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows" EXTRA_INCLUDES_FOR_WIN32="-I\$(srcdir)/packages/PLStream/windows"
@ -542,13 +542,33 @@ then
yap_cv_readline=no yap_cv_readline=no
if test "$prefix" = "NONE" if test "$prefix" = "NONE"
then then
if test "$target_win64" = yes #mingw64
case "$build_os" in
*linux*)
if test "${WINEPREFIX}x" = x
then
SYSTEMDRIVE=$HOME/.wine/drive_c
else
SYSTEMDRIVE="$WINEPREFIX"
fi
if test "$target_cpu" = "x86_64"
then
prefix="$SYSTEMDRIVE/Yap64"
else
prefix="$SYSTEMDRIVE/Yap"
fi
;;
**)
if test "$target_cpu" = "x86_64"
then then
prefix="\${SYSTEMDRIVE}/Yap64" prefix="\${SYSTEMDRIVE}/Yap64"
else else
prefix="\${SYSTEMDRIVE}/Yap" prefix="\${SYSTEMDRIVE}/Yap"
fi fi
;;
esac
fi fi
echo $prefix
ENABLE_WINCONSOLE="" ENABLE_WINCONSOLE=""
else else
ENABLE_WINCONSOLE="#" ENABLE_WINCONSOLE="#"