commit configure

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@686 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-11-13 15:29:44 +00:00
parent 81716ef31f
commit 304fad4247
4 changed files with 955 additions and 470 deletions

View File

@ -509,14 +509,15 @@ install_win32: startup
mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_PROGRAM) -m 755 yap.exe $(DESTDIR)$(BINDIR)/yap.exe
$(INSTALL_PROGRAM) -m 755 yap.dll $(DESTDIR)$(BINDIR)/yap.dll
$(INSTALL_PROGRAM) -m 755 libWYap.a $(DESTDIR)$(YAPLIBDIR)/libWYap.a
$(INSTALL_PROGRAM) -m 755 startup $(DESTDIR)$(YAPLIBDIR)/startup
$(INSTALL) $(HEADERS) $(DESTDIR)$(INCLUDEDIR)
$(INSTALL) $(srcdir)/include/c_interface.h $(DESTDIR)$(INCLUDEDIR)/c_interface.h
$(INSTALL) config.h $(INCLUDEDIR)/config.h
(cd library/random; make install_win32)
(cd library/regex; make install_win32)
(cd library/system; make install_win32)
(cd library/yap2swi; make install_win32)
(cd library/random; make install)
(cd library/regex; make install)
(cd library/system; make install)
(cd library/yap2swi; make install)
install_library: @YAPLIB@
$(INSTALL_DATA) libYap.a $(DESTDIR)$(LIBDIR)/libYap.a
@ -554,34 +555,18 @@ dist:
.c.s:
$(CC) $(CFLAGS) -S $<
#
# create a new DLL library on cygwin environments
#
# DLLNAME: name of the new dll
# OBJS: list of object files I want to put in
# LIBS: list of libraries to link with
# DEFFILE is the name of the definitions file.
# BASEFILE temporary
# EXPFILE temporary
# ENTRY is the entry point int WINAPI startup (HINSTANCE, DWORD, LPVOID)
#
DLLTOOL=dlltool
DLLNAME=yap.dll
DLL_LIBS=@DLL_LIBS@ $(LIBS)
BASE_FILE=yap.base
EXP_FILE=yap.exp
DEF_FILE=$(srcdir)/misc/yap.def
ENTRY_FUNCTION=_win_yap@12
#
# use my own .def file.
libWYap.a: yap.dll
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME) --def $(DEF_FILE) --output-lib libWYap.a
dlltool --def $(srcdir)/misc/yap.def \
--dllname yap.dll \
--output-lib libWYap.a
yap.dll: $(HEADERS) $(LIB_OBJECTS) $(DEF_FILE)
$(LD) -s --base-file $(BASE_FILE) --dll -o $(DLLNAME) $(LIB_OBJECTS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME) --def $(DEF_FILE) --base-file $(BASE_FILE) --output-exp $(EXP_FILE)
$(LD) -s --base-file $(BASE_FILE) $(EXP_FILE) -dll -o $(DLLNAME) $(LIB_OBJECTS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME) --def $(DEF_FILE) --base-file $(BASE_FILE) --output-exp $(EXP_FILE)
$(LD) $(EXP_FILE) --dll -o $(DLLNAME) $(LIB_OBJECTS) $(DLL_LIBS) -e $(ENTRY_FUNCTION)
yap.dll: libYap.a
$(CC) $(CFLAGS) -shared -o yap.dll \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive libYap.a \
-Wl,--no-whole-archive $(LIBS)
install_info:
make info; \

View File

@ -6,30 +6,68 @@ how to do it from scratch.
$YAPSRC is the directory where you can find the sources
$YAPVERSION is the current version for YAP.
CYGWIN:
GCC-Based compilation:
This is our suggested approach as YAP can use GCC features to
generate faster code. You should install the CygWin environment first,
as available from sourceware.cygnus.com and mirrors. YAP should
compile under cygwin 20.1 but we suggest using the newer 1.1.1 (April
Release), which has a more complete implementation of the WIN32 API
and uses GCC2.95.2 instead of egcs. The compilation steps under the
cygwin shell are as follows:
GCC is distributed in the MINGW32 and CYGWIN packages.
mkdir cyg
CC="gcc -mno-cygwin" $YAPSRC/configure
make
make install
The Mingw32 environment is available from the URL:
The "-mno-cygwin" disables the use of the cygwin dll. The
compiler will use the mingw32 environment instead.
@code{http://www.mingw.org}
You should also check the default installation path which is
set to "/PROGRA~1/Yap" in the Makefile. This should correspond to
"/Program Files/Yap".
You will need to install the @code{msys} and @code{mingw}
packages. You should be able to do configure, make and make install.
The cygwin environment does not provide gmp. You can fetch a dll for
the gmp library from "http://www.sf.net/projects/mingwrep".
If you use mingw32 you may want to search the contributed packages for
the @code{gmp} multi-precision arithmetic library. If you do setup Yap
with @code{gmp} note that @code{libgmp.dll} must be in the path,
otherwise Yap will not be able to execute.
CygWin environment is available from the URL:
@code{http://www.cygwin.com}
@noindent
and mirrors. We suggest using recent versions of the cygwin shell. The
compilation steps under the cygwin shell are as follows:
@example
mkdir cyg
$YAPSRC/configure --enable-coroutining \\
--enable-depth-limit \\
--enable-max-performance
make
make install
@end example
By default, Yap will use the @code{--enable-cygwin=no} option to
disable the use of the cygwin dll and to enable the mingw32 subsystem
instead. Yap thus will not need the cygwin dll. It instead accesses
the system's @code{CRTDLL.DLL} @code{C} run time library supplied with
Win32 platforms through the mingw32 interface. Note that some older
WIN95 systems may not have @code{CRTDLL.DLL}, in this case it should
be sufficient to import the file from a newer WIN95 or WIN98 machine.
You should check the default installation path which is set to
@code{/PROGRA~1/Yap} in the standard Makefile. This string will usually
be expanded into @code{c:\Program Files\Yap} by Windows.
The cygwin environment does not provide @t{gmp}. You can fetch a dll for
the @t{gmp} library from @url{http://www.sf.net/projects/mingwrep}.
It is also possible to configure Yap to be a part of the cygwin
environment. In this case you should use:
@example
mkdir cyg
$YAPSRC/configure --enable-coroutining \\
--enable-max-performance \\
--enable-cygwin=yes
make
make install
@end example
Yap will then compile using the cygwin library and will be installed
in cygwin's @code{/usr/local}. You can use Yap from a cygwin console,
or as a standalone application as long as it can find
@code{cygwin1.dll} in its path.
VISUAL C++:

1276
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -282,27 +282,25 @@ then
INSTALL_COMMAND=install_win32
CC="gcc -mno-cygwin"
AC_CHECK_LIB(wsock32,main)
yap_cv_readline=no
if test "$prefix" = "NONE"
then
prefix="c:/Program\\ Files/Yap"
fi
DLL_LIBS="-L /usr/lib/mingw -lmsvcrt -lmingw32 -lkernel32"
else
DLL_LIBS=""
LIBS="-lcygwin -lkernel32"
INSTALL_COMMAND=install_unix
fi
elif test "$target_os" = "mingw32"
then
yap_cv_readline=no
INSTALL_COMMAND=install_win32
AC_CHECK_LIB(wsock32,main)
if test "$prefix" = "NONE"
then
prefix="c:/Program\\ Files/Yap"
fi
DLL_LIBS="-L /usr/mingw/lib -lmsvcrt -lmingw32 -lkernel32"
else
DLL_LIBS=""
INSTALL_COMMAND="install_unix"
AC_CHECK_LIB(m,sin)
AC_CHECK_LIB(socket,socket)
@ -389,6 +387,8 @@ dnl Exports:
dnl
dnl "" if we can do dynamic linking, "#" otherwise
AC_SUBST(INSTALL_DLLS)
dnl if we need to merge several .o files into a single dll.
AC_SUBST(MERGE_DLL_OBJS)
dnl C-flags used to compile a file that will be loaded dynamically
AC_SUBST(SHLIB_CFLAGS)
dnl suffix for loadable binary (.so,.dll,.o)
@ -399,23 +399,20 @@ AC_SUBST(EXEC_SUFFIX)
dnl how to call the loader
AC_SUBST(DO_SECOND_LD)
AC_SUBST(SHLIB_LD)
dnl makefile target for building YAP library or dll
AC_SUBST(NEWSHOBJ)
dnl objects in YAP library
AC_SUBST(YAPLIB)
dnl install_info
AC_SUBST(INSTALL_INFO)
dnl let YAP_EXTRAS fall through configure, from the env into Makefile
AC_SUBST(YAP_EXTRAS)
AC_SUBST(DLL_LIBS)
AC_SUBST(NO_BUILTIN_REGEXP)
dnl defaults
INSTALL_DLLS="#"
SHLIB_LD="@#"
DO_SECOND_LD="#"
NEWSHOBJ="sobjs"
M4="m4"
MERGE_DLL_OBJS="#"
if test "$dynamic_loading" = "yes"
then
@ -567,25 +564,18 @@ dnl Linux has both elf and a.out, in this case we found elf
INSTALL_DLLS=""
fi
;;
*cyg*)
*cyg*|*mingw*)
# gcc on cygwin seems to have trouble with longjmp
# and -fomit-frame-point -DBP_FREE
YAPLIB="libWYap.a"
SHLIB_CFLAGS=""
NEWSHOBJ="dll"
SHLIB_LD="gcc -shared ../../yap.dll"
SHLIB_SUFFIX=".dll"
C_PARSER_FLAGS="$C_INTERF_FLAGS"
EXEC_SUFFIX=".exe"
INSTALL_DLLS=""
;;
*mingw*)
# gcc on cygwin seems to have trouble with longjmp
# and -fomit-frame-point -DBP_FREE
YAPLIB="libWYap.a"
SHLIB_SUFFIX=".dll"
NEWSHOBJ="dll"
C_PARSER_FLAGS="$C_INTERF_FLAGS"
EXEC_SUFFIX=".exe"
DO_SECOND_LD=""
MERGE_DLL_OBJS=""
;;
*)
AC_CHECK_LIB(dl,dlopen,